/* --- Глобальные настройки и переменные --- */
:root {
    --primary-color: #1A2E40;
    --secondary-color: #F2E9E4;
    --accent-color: #C9A959;
    --text-color: #3d3d3d;
    --light-gray: #f9f9f9;
    --white: #ffffff;

    --font-primary: 'Lato', sans-serif;
    --font-headings: 'Playfair Display', serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

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

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

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

ul {
    list-style: none;
}

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


/* --- Хедер --- */
.header {
    background-color: var(--secondary-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.header__nav {
    display: none; /* Скрыто на мобильных */
}

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

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

.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__menu-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
}

/* --- Футер --- */
.footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding-top: 60px;
}

.footer__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer__column .logo {
    color: var(--white);
    font-size: 28px;
}

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

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

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

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

.footer__list--contacts li {
    display: flex;
    align-items: center;
}

.footer__icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
}

.footer__bottom {
    background-color: rgba(0,0,0,0.2);
    padding: 15px 0;
    text-align: center;
}

.footer__copyright {
    font-size: 14px;
    opacity: 0.7;
}

/* --- Адаптивность --- */
@media (min-width: 768px) {
    .header__menu-button {
        display: none;
    }
    .header__nav {
        display: block;
    }
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer__container {
        grid-template-columns: 2fr 1fr 2fr 2fr;
        gap: 50px;
    }
}

/* --- Секция Hero --- */
.hero {
    position: relative;
    padding: 80px 0;
    background-color: var(--secondary-color);
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.5;
}

.hero__container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 40px;
    text-align: center;
}

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

.hero__subtitle {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: 2px solid var(--primary-color);
}

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

.hero__visual {
    display: none; /* Скрываем на мобильных по умолчанию */
}

.hero__image {
    width: 100%;
    height: auto;
    max-width: 450px;
    border-radius: 10px;
}


/* --- Адаптивность для Hero --- */
@media (min-width: 768px) {
    .hero {
        min-height: auto;
        padding: 100px 0;
    }

    .hero__title {
        font-size: 54px;
    }

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


@media (min-width: 1024px) {
    .hero__container {
        grid-template-columns: 1.2fr 1fr;
        gap: 60px;
        text-align: left;
    }

    .hero__subtitle {
        margin-left: 0;
        margin-right: 0;
    }

    .hero__visual {
        display: block; /* Показываем на десктопах */
        text-align: right;
    }
}

/* --- Общие стили для секций --- */
.section {
    padding: 80px 0;
}

.section__title {
    font-family: var(--font-headings);
    font-size: 36px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 50px;
}

/* --- Секция "Экспертиза" --- */
.expertise {
    background-color: var(--white);
}

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

.expertise__card {
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.expertise__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(26, 46, 64, 0.1);
}

.expertise__card-icon {
    margin-bottom: 20px;
    color: var(--accent-color);
}

.expertise__card-icon svg {
    width: 48px;
    height: 48px;
}

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

.expertise__card-text {
    font-size: 16px;
    line-height: 1.7;
}


/* --- Адаптивность для Экспертизы --- */
@media (min-width: 768px) {
    .section {
        padding: 100px 0;
    }

    .section__title {
        font-size: 42px;
    }

    .expertise__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Секция "Подход" --- */
.approach {
    background-color: var(--secondary-color);
}

.section__subtitle {
    text-align: center;
    max-width: 700px;
    margin: -30px auto 50px;
    font-size: 18px;
    color: var(--text-color);
    opacity: 0.9;
}

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

.approach__step {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.approach__step:hover {
    box-shadow: 0 10px 25px rgba(26, 46, 64, 0.1);
}

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

.approach__step-icon {
    color: var(--accent-color);
    flex-shrink: 0;
}

.approach__step-icon svg {
    width: 32px;
    height: 32px;
}

.approach__step-title {
    font-family: var(--font-headings);
    font-size: 22px;
    color: var(--primary-color);
}

.approach__step-text {
    font-size: 16px;
    line-height: 1.7;
}

.approach__step-number {
    position: absolute;
    right: 20px;
    bottom: 0px;
    font-size: 80px;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.05;
    line-height: 1;
    user-select: none;
}


/* --- Адаптивность для "Подхода" --- */
@media (min-width: 768px) {
    .approach__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
     .approach__grid {
        gap: 40px;
    }
    .approach__step {
        padding: 40px;
    }
}
/* --- Секция "Кейсы" --- */
.cases {
    background-color: var(--white);
}

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

.case-item {
    background-color: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.case-item__image-wrapper {
    line-height: 0;
}

.case-item__image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.case-item__content {
    padding: 30px;
}

.case-item__tag {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 15px;
}

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

.case-item__text {
    margin-bottom: 20px;
}

.case-item__result {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--white);
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.08);
}

.case-item__result-icon {
    color: var(--primary-color);
}

.case-item__result-text {
    font-weight: 700;
    color: var(--primary-color);
}


/* --- Адаптивность для Кейсов --- */
@media (min-width: 768px) {
    .cases__wrapper {
        gap: 60px;
    }

    .case-item {
        grid-template-columns: 1fr 1.2fr;
        align-items: center;
    }

    .case-item__image {
        height: 100%;
    }

    .case-item--reverse {
        grid-template-columns: 1.2fr 1fr;
    }

    .case-item--reverse .case-item__image-wrapper {
        order: 2;
    }
    
    .case-item--reverse .case-item__content {
        order: 1;
    }
    
    .case-item__content {
        padding: 40px;
    }
}

/* --- Секция "Публикации" --- */
.publications {
    background-color: var(--secondary-color);
}

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

.publication-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publication-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(26, 46, 64, 0.1);
}

.publication-card__image-link {
    display: block;
    line-height: 0;
}

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

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

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

.publication-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.publication-card__tag {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 700;
}

.publication-card__date {
    color: var(--text-color);
    opacity: 0.7;
}

.publication-card__title {
    font-family: var(--font-headings);
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 10px;
    flex-grow: 1;
}

.publication-card__title a {
    color: var(--primary-color);
}

.publication-card__excerpt {
    margin-bottom: 20px;
    color: var(--text-color);
}

.publication-card__read-more {
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.publication-card__read-more svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.publication-card__read-more:hover svg {
    transform: translateX(4px);
}


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

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

/* --- Секция "Контакты" --- */
.contact {
    background-color: var(--white);
}

.contact__wrapper {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
}

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

.form-group__label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.form-group__input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    font-family: var(--font-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group__input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(201, 169, 89, 0.2);
}

.form-group--checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group--checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-group--checkbox label {
    margin-bottom: 0;
    font-weight: 400;
}

.form-group--checkbox a {
    text-decoration: underline;
}

.contact__button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
}

/* Стили для сообщений формы */
.form-message {
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.form-message--success {
    background-color: #e4f8f0;
    border: 1px solid #58b991;
    color: #2b7a5e;
}

.form-message--error {
    background-color: #fdeaea;
    border: 1px solid #e98989;
    color: #a94442;
}


/* --- Адаптивность для Контактов --- */
@media (min-width: 768px) {
    .contact__wrapper {
        padding: 50px;
    }
}

/* --- Cookie Pop-up --- */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Изначально скрыт */
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px;
    z-index: 200;
    transition: bottom 0.5s ease-in-out;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

.cookie-popup.active {
    bottom: 0;
}

.cookie-popup__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-popup__text {
    text-align: center;
    color: var(--secondary-color);
}

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

.cookie-popup__button {
    background-color: var(--accent-color);
    color: var(--primary-color);
    border-color: var(--accent-color);
    padding: 8px 25px;
}

.cookie-popup__button:hover {
    background-color: var(--white);
    border-color: var(--white);
}

@media (min-width: 768px) {
    .cookie-popup__content {
        flex-direction: row;
    }
    .cookie-popup__text {
        text-align: left;
    }
}

/* --- Стили для страниц политик (privacy.html и т.д.) --- */
.pages {
    padding: 60px 0;
    background-color: var(--white);
}

.pages .container {
    max-width: 800px;
}

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

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

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

.pages p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--text-color);
}

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

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

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

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

.pages strong {
    color: var(--primary-color);
}