/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

svg {
    width: 100%;
    height: 100%;
}


/* ===== VARIABLES ===== */
:root {
    /* Основная палитра */
    --color-bg: #ffffff;
    --color-surface: #ece8e1;
    --color-surface-rgb: 236, 232, 225;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-primary: #162840;      /* глубокий тёмно-синий */
    --color-primary-light: #3b5d87;
    --color-accent: #a7785b;       /* золотой/латунь */
    --color-accent-light: #f9ebc1;
    --color-secondary: #E54B2D;    /* оранжевый для акцентов */

    /* Серые */
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;

    /* Тени */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

    /* Скругления */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    /* Контейнер */
    --container-width: 1280px;
    --container-padding: 1.5rem;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text);
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== LAYOUT ===== */
.container {
    position: relative;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    margin-bottom: 0.5rem;
}

.section-title p {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.125rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    text-align: center;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary-light);
    border: 2px solid var(--color-primary-light);
    color: white;
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-primary);
    font-weight: 600;
}

.btn-accent:hover {
    background-color: var(--color-accent-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}


/* ===== LOGO ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    text-decoration: none;
    color: var(--color-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    margin-top: 3px;
    width: 32px;
    height: 32px;
    fill: var(--color-primary);
    transition: fill 0.2s ease;
}

.logo:hover .logo-icon {
    fill: var(--color-accent);
}
.logo-text {
    line-height: 1;
}
.logo-text span {
    color: var(--color-accent);
}


/* ===== FOOTER LOGO ===== */
.footer__logo {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo-icon {
    margin-top: 3px;
    width: 32px;
    height: 32px;
    fill: white;
    transition: fill 0.2s ease;
}

.footer__logo:hover .footer-logo-icon {
    fill: var(--color-accent);
}

.footer-logo-text span {
    color: var(--color-bg);
}




/* ===== HEADER ===== */
.header {
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}


.nav__list {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav__link {
    font-weight: 500;
    transition: color 0.2s;
}

.nav__link:hover {
    color: var(--color-primary);
}

.header__cta {
    display: flex;
    gap: 1rem;
}

/* ===== БУРГЕР-МЕНЮ ===== */
.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 110;
}

.burger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    left: 0;
    transition: all 0.3s ease;
}

.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 11px; }
.burger span:nth-child(3) { top: 22px; }

.burger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 11px;
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 11px;
}

/* Скрываем обёртку навигации на мобильных по умолчанию */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
}

@media (max-width: 768px) {
    .burger {
        display: block;
    }

    .nav-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 100;
        padding: 2rem;
    }

    .nav-wrapper.open {
        transform: translateX(0);
    }

    .nav__list {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .header__cta {
        flex-direction: column;
        gap: 1rem;
    }

    .header__container {
        position: relative;
        z-index: 110;
    }
}

.no-scroll {
    overflow: hidden;
}




/* ===== HERO ===== */
.hero {
    padding: 4rem 0;
    background: linear-gradient(to bottom, white, var(--color-surface));
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    z-index: 2;
}

.hero__title {
    font-size: 3.75rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero__title span {
    color: var(--color-primary);
    position: relative;
    display: inline-block;
}

.hero__subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero__cta {
    display: flex;
    gap: 1rem;
}

.hero__image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero__image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== COMPETENCIES ===== */
.competencies {
    background-color: white;
}

.competencies__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    position: relative;
    overflow: hidden; /* чтобы псевдоэлемент не вылезал за скруглённые углы */
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.article-card {
    margin-bottom: 1rem;
}

/* Псевдоэлемент для фоновой текстуры */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* чтобы не мешать кликам */
    z-index: 0; /* под контентом */
}

/* Всё содержимое карточки (кроме псевдоэлемента) поднимаем выше */
.card > * {
    position: relative;
    z-index: 1;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    opacity: 0.5;
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.card__text {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.card__link {
    font-weight: 600;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.card__link:hover {
    color: var(--color-accent);
}




/* ===== WHY US SECTION ===== */
.why-us {
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
    background: transparent; /* фон задаётся слоями */
}

/* Фоновое изображение (горы/здания) */
.why-us-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.why-us-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* можно регулировать насыщенность */
    filter: grayscale(100%);
}

/* Градиентный слой: сверху — цвет bg, снизу — surface, с прозрачностью */
.why-us-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 1) 0%,         /* --color-bg (white) с непрозрачностью 0.9 */
            rgba(236, 232, 225, 0.7) 70%,        /* --color-surface (бежевый) с прозрачностью 0.3 */
            rgba(236, 232, 225, 0.4) 100%          /* полностью прозрачный */
    );
    /* Значения 0.9 и 0.3 подобраны ориентировочно, подстрой под своё изображение */
}

/* Контент поверх слоёв */
.why-us__content {
    position: relative;
    z-index: 3;
}

/* ===== TWO-COLUMN LAYOUT FOR BENEFITS ===== */
.why-us__grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.why-us__col {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Строка преимущества (иконка слева, текст справа) */
.benefit-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.benefit-row__icon {
    flex-shrink: 0;
}

.benefit-row__icon .icon {
    width: 48px;
    height: 48px;
    fill: var(--color-primary);
}

.benefit-row:hover .benefit-row__icon .icon {
    fill: var(--color-accent);
}

.benefit-row__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.benefit-row__text {
    color: var(--color-text-light);
    line-height: 1.6;
    font-size: 1rem;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .why-us__grid-2col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .why-us-gradient {
        background: linear-gradient(
                to bottom,
                rgba(255, 255, 255, 0.95) 0%,
                rgba(236, 232, 225, 0.5) 80%,
                rgba(236, 232, 225, 0) 100%
        );
    }
}

@media (max-width: 480px) {
    .benefit-row {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .benefit-row__icon .icon {
        width: 40px;
        height: 40px;
        margin: 0 auto;
    }
}

/* Базовый стиль для иконки CFS */
.icon-cfs {
    width: 48px;
    height: 48px;
    fill: var(--color-primary);
    transition: fill 1.4s ease, transform 1.6s cubic-bezier(0.25, 0.1, 0.15, 1);
}

/* Варианты вращения */
.benefit-row__icon--rotate-15 .icon-cfs { transform: rotate(-135deg); }
.benefit-row__icon--rotate-30 .icon-cfs { transform: rotate(-75deg); }
.benefit-row__icon--rotate-45 .icon-cfs { transform: rotate(75deg); }
.benefit-row__icon--rotate-60 .icon-cfs { transform: rotate(105deg); }
.benefit-row__icon--rotate-75 .icon-cfs { transform: rotate(135deg); }

/* Эффект при наведении: доворот до 0? Или усиление */
.benefit-row:hover .icon-cfs {
    fill: var(--color-accent);
    transform: rotate(0deg) scale(1.05); /* возврат к исходному положению и увеличение */
}








/* ===== PROCESS (HOW WE WORK) ===== */
.process {
    padding: 5rem 0;
    background-color: var(--color-bg);
}

.process__steps {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 2rem;
}

.process__step {
    flex: 1;
    text-align: center;
    padding: 1.5rem 1rem;
    transition: transform 0.3s ease;
}

.process__step:hover {
    transform: translateY(-5px);
}

.process__step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.process__step-desc {
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.process__step-label {
    font-weight: 600;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: var(--color-primary);
    letter-spacing: 0.02em;
    margin-top: 0.5rem;
}

/* Стрелки */

.process__arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
}

.process__arrow .icon {
    width: 100%;
    height: auto;
    fill: var(--color-gray-200);
    transition: 0.3s ease;
    transform: rotate(180deg);
}

/* При наведении на саму стрелку меняем цвет */
.process__arrow:hover .icon {
    transform: rotate(180deg) scale(1.3) translateX(-6px);
    fill: var(--color-gray-300);
}

/* При наведении на этап, расположенный слева от стрелки, меняем цвет стрелки */
.process__step:hover + .process__arrow .icon {
    transform: rotate(180deg) scale(1.3) translateX(-6px);
    fill: var(--color-gray-300);
}

/* Для второй стрелки: наведение на третий этап (справа) — сложно без перестановки,
   поэтому ограничимся наведением на саму стрелку (уже есть) и на предыдущий этап. */

/* Адаптивность */
@media (max-width: 768px) {
    .process__steps {
        flex-direction: column;
        gap: 1rem;
    }

    .process__arrow {
        width: 100%;
        height: 30px;
        margin: 0.5rem 0;
        transform: rotate(90deg);
    }

    .process__arrow .icon {
        width: 30px;
        height: auto;
    }

    .process__step {
        padding: 1rem;
    }
}






/* ===== CLIENTS / TRUST ===== */
.clients {
    background: linear-gradient(
            to bottom,
            rgba(236, 232, 225, 0.7) 0%,
            rgba(236, 232, 225, 0.5) 30%,
            rgba(255, 255, 255, 1) 60%,
            rgba(255, 255, 255, 1) 100%
    );
    padding: 5rem 0;
}

.clients__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-top: 2rem;
}

.client-item {
    flex: 0 0 auto;
    width: 160px;
    transition: all 0.3s ease;
    opacity: 0.5;
    filter: grayscale(100%);
}

.client-item img {
    height: auto;
    display: block;
    max-height: 60px;
    width: auto;
    max-width: 100%;
}

.client-item:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Адаптивность */
@media (max-width: 768px) {
    .clients__grid {
        gap: 2rem;
    }
    .client-item {
        width: 120px;
    }
}

@media (max-width: 480px) {
    .client-item {
        width: 100px;
    }
}






/* ===== CTA ===== */

.cta {
    background-color: var(--color-primary);
    color: white;
    text-align: center;
    padding: 4rem 0;
}
.cta h2 {
    color: white;
    margin-bottom: 1rem;
}
.cta p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.125rem;
}
.cta .btn {
    background-color: var(--color-gray-100);
    color: var(--color-primary);
    border: none;
    font-size: 1.125rem;
    padding: 1rem 2.5rem;
}
.cta .btn:hover {
    background-color: var(--color-accent-light);
}







/* ===== PROJECTS ===== */
.projects {
    background-color: var(--color-surface);
    padding: 5rem 0;
}

.projects__list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.project-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: filter 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.7;
}

.project-item:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.project-item img {
    width: 200px;
    height: auto;
    display: block;
}

.project-item span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
}

.project-item--coming {
    opacity: 1;
    cursor: default;
}

.project-item--coming:hover {
    opacity: 1;
}

.project-item small {
    font-weight: normal;
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* Адаптивность */
@media (max-width: 768px) {
    .projects__list {
        gap: 2rem;
    }
    .project-item img {
        width: 80px;
    }
}





/* ===== PAGE TITLE ===== */
.page_title {
    position: relative;
    overflow: hidden;
    padding: 3rem 0;
    background: transparent; /* фон задаётся слоями */
}

/* Фоновое изображение (горы/здания) */
.page_title_bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page_title_bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* можно регулировать насыщенность */
    filter: grayscale(100%);
}

/* Контент поверх слоёв */
.page_title_content {
    position: relative;
    z-index: 3;
}













/* ===== FOOTER ===== */
.footer {
    background-color: #08121e;
    color: white;
    padding: 3rem 0;
}

.footer__container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer__about p {
    color: var(--color-gray-400);
    margin-bottom: 1.5rem;
}

.footer__social {
    display: flex;
    gap: 1rem;
}

.footer__social-link {
    color: var(--color-gray-400);
    transition: color 0.2s;
}

.footer__social-link:hover {
    color: var(--color-accent);
}

.footer__title {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer__list {
    list-style: none;
}

.footer__list li {
    margin-bottom: 0.75rem;
}

.footer__list a {
    color: var(--color-gray-400);
    transition: color 0.2s;
}

.footer__list a:hover {
    color: white;
}

.footer__bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-gray-800);
    text-align: center;
    color: var(--color-gray-500);
}



/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    .hero__container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero__title { font-size: 3rem; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .footer__container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header__container { flex-wrap: wrap; height: auto; padding: 1rem 0; }
    .nav__list { gap: 1rem; flex-wrap: wrap; }
    .hero__title { font-size: 2.5rem; }
    .competencies__grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .footer__container { grid-template-columns: 1fr; }
}


/* ===== ANIMATIONS ===== */

.animate-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-content {
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-image {
    animation: fadeIn 1s ease 0.3s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ===== HERO ===== */
.hero {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
}

/* Слой с фоновой картинкой */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #0a0f1e; /* запасной цвет */
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4; /* можно регулировать, если нужно */
}

/* Полупрозрачный градиент */
.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0.7),    /* white с прозрачностью 0.85 */
    var(--color-surface)     /* var(--color-surface) в RGB (пример) */
    );
    /* Если у вас --color-surface: #f9fafb, то его RGB: 249,250,251 */
}

/* Контент поверх всего */
.hero__container {
    position: relative;
    z-index: 4;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .hero-blob {
        opacity: 0.3;
        filter: blur(50px);
        animation: none; /* отключаем анимацию для производительности */
    }
}











/* ===== BACK NAVIGATION ===== */
.set-navigation {
    margin-bottom: 2rem;
    padding: 1rem 0;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-light);
    font-weight: 500;
    transition: color 0.2s ease;
}
.back-link:hover {
    color: var(--color-primary);
}

.page__section {
    position: relative;
    padding: 2rem 0;
}
.page__text {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;        /* или justify, если хотите ровные края */
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-text-light);
    text-align: justify;
}

.page__text  p {
    margin-bottom: 1.25rem;
}
.page__section_bg {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, /* --color-bg (white) с непрозрачностью 0.9 */ rgba(236, 232, 225, 0.7) 70%, /* --color-surface (бежевый) с прозрачностью 0.3 */ rgba(236, 232, 225, 0.4) 100% /* полностью прозрачный */);
}

/* ===== PRINCIPLES 2x2 WITH HEXAGON BACKGROUND ===== */
.principles__wrapper {
    position: relative;
    margin: auto;
    margin-top: 3rem;
    width: 80%;
}

/* Десктопный гексагон (один общий) */
.principles__hexagon-desktop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 480px;
    height: 480px;
    z-index: 0;
    pointer-events: none;
}
.principles__hexagon-desktop img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Сетка 2×2 */
.principles__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem 10rem;
    position: relative;
    z-index: 1;
}

/* Общие стили для ячеек */
.principle-item {
    background: transparent;
    border: 1px solid transparent;
    padding: 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(0);
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

/* Базовые стили для иконок (всех) */
.principle-icon {
    width: 3rem;
    height: 3rem;
    fill: var(--color-gray-500);
    transition: fill 0.2s ease;
    position: absolute;
    z-index: 3;
}

/* Иконка в левом верхнем углу */
.principle-icon--tl {
    top: 1.5rem;
    left: 1.5rem;
}
/* Иконка в правом верхнем углу */
.principle-icon--tr {
    top: 1.5rem;
    right: 1.5rem;
}
/* Иконка в левом нижнем углу */
.principle-icon--bl {
    bottom: 1.5rem;
    left: 1.5rem;
}
/* Иконка в правом нижнем углу */
.principle-icon--br {
    bottom: 1.5rem;
    right: 1.5rem;
}

/* Выравнивание текста в ячейках */
.principle-item--tl {
    text-align: left;
    align-self: start;
    justify-self: start;
}
.principle-item--tr {
    text-align: right;
    align-self: start;
    justify-self: end;
}
.principle-item--bl {
    text-align: left;
    align-self: end;
    justify-self: start;
}
.principle-item--br {
    text-align: right;
    align-self: end;
    justify-self: end;
}

/* Для ячеек, где иконка сверху, даём отступ, чтобы текст не наезжал на иконку */
.principle-item--tl,
.principle-item--tr {
    padding-top: 5rem;
}
.principle-item--bl,
.principle-item--br {
    padding-bottom: 5rem;
}

.principle-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}
.principle-text {
    color: var(--color-text-light);
    line-height: 1.5;
}

/* Ховер: рамка + фон (перекрывает диаграмму) */
.principle-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(2px);
    z-index: 10;
}
.principle-item:hover .principle-icon {
    fill: var(--color-accent);
}

/* ===== АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .principles__hexagon-desktop {
        display: none;
    }
    .principles__wrapper {
        width: 100%;
    }
    .principles__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .principle-item {
        text-align: center !important;
        align-self: center !important;
        justify-self: center !important;
        background: rgba(255,255,255,0.8);
        border: 1px solid var(--color-gray-200);
        backdrop-filter: blur(4px);
        width: 100%;
        padding: 2rem;
    }
    /* На мобильных убираем абсолютное позиционирование иконок */
    .principle-icon {
        position: static;
        display: block;
        margin: 0 auto 1rem auto;
        width: 2.5rem;
        height: 2.5rem;
    }
    .principle-item--tl,
    .principle-item--tr,
    .principle-item--bl,
    .principle-item--br {
        padding: 2rem;
    }
    .principle-item:hover {
        background: white;
    }
}




/* ===== SERVICE PAGE ===== */
.service__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}
.service__card {
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.service__card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}
.service__card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
}
.service__card p {
    color: var(--color-text-light);
    line-height: 1.5;
    margin: 0;
}

/* Лесенка для блока «Что входит» */
.service__steps {
    margin: 2rem 0;
}
.service__step {
    position: relative;
    border: 1px solid var(--color-gray-200);
    border-radius: 0;
    padding: 2rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    width: calc(100% - 0px);
    transform: translateX(0);
    overflow: hidden; /* чтобы изображение не выходило за границы */
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 40%, rgba(236, 232, 225, 0.7) 100%);
}
/* Псевдоэлемент с полупрозрачным логотипом поверх градиента */
.service__step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/assets/images/icons/logo-half.png') no-repeat left center / auto 80%;
    opacity: 0.1;          /* регулируемая прозрачность изображения */
    pointer-events: none;  /* чтобы не мешать кликам */
    z-index: 0;            /* под текстом, но над градиентом, так как градиент в самом блоке ниже? */
}
/* Смещение вправо для каждого следующего элемента */
.service__step:nth-child(1) { transform: translateX(0); }
.service__step:nth-child(2) { transform: translateX(20px); }
.service__step:nth-child(3) { transform: translateX(40px); }
.service__step:nth-child(4) { transform: translateX(60px); }
.service__step:nth-child(5) { transform: translateX(80px); }
.service__step:nth-child(6) { transform: translateX(100px); }
.service__step:nth-child(7) { transform: translateX(120px); }
.service__step:nth-child(8) { transform: translateX(140px); }
.service__step:nth-child(9) { transform: translateX(160px); }
/* Ховер как в карточках */
.service__step:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(2px);
    z-index: 10;
    transform: translateX(0) scale(1.01); /* при ховере выравниваем и чуть увеличиваем */
}

.service__step h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
}
.service__step p {
    color: var(--color-text-light);
    line-height: 1.5;
    margin: 0;
}

.label {
    color: var(--color-primary);
    font-weight: 500;
    padding-top: 10px;
}

/* Адаптив: на мобильных убираем смещение, делаем обычный список */
@media (max-width: 768px) {
    .service__step {
        transform: translateX(0) !important;
        margin-bottom: 1rem;
    }
    .service__step:hover {
        transform: scale(1.01);
    }
}







/* ===== CONTACT PAGE ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-form,
.contact-info {
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.contact-form h3,
.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
}

.contact-info__item {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.contact-info__item strong {
    display: inline-block;
    width: 90px;
    color: var(--color-text);
}

.contact-info__item span,
.contact-info__item a {
    color: var(--color-text-light);
    text-decoration: none;
}

.contact-info__item a:hover {
    color: var(--color-accent);
}

.contact-map {
    margin-top: 3rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-gray-200);
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .contact-info__item strong {
        width: auto;
        display: block;
        margin-bottom: 0.25rem;
    }
}


/* ===== ERROR PAGES ===== */
.error-section {
    padding: 5rem 0;
    text-align: center;
    background-color: var(--color-surface);
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .error-code {
        font-size: 5rem;
    }
    .error-title {
        font-size: 1.5rem;
    }
    .error-message {
        font-size: 1rem;
    }
}


/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}
.modal-container {
    position: relative;
    z-index: 2;
    background: var(--color-bg, #ffffff);
    border-radius: var(--radius-lg, 1rem);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0,0,0,0.1));
    padding: 2rem;
}
.modal-container h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--color-primary, #162840);
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-gray-500, #6b7280);
    transition: color 0.2s ease;
}
.modal-close:hover {
    color: var(--color-primary, #162840);
}
/* Сообщения формы */
.form-message {
    margin-top: 1rem;
}
.form-message .loading {
    color: var(--color-gray-500, #6b7280);
    padding: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
}
.form-message .success {
    color: #2e7d32;
    padding: 0.75rem;
    text-align: center;
    background: #e8f5e9;
    border-radius: var(--radius-md, 0.5rem);
    font-size: 0.875rem;
}
.form-message .error {
    color: #c62828;
    padding: 0.75rem;
    text-align: center;
    background: #ffebee;
    border-radius: var(--radius-md, 0.5rem);
    font-size: 0.875rem;
}

@media (max-width: 480px) {
    .modal-container {
        padding: 1.5rem;
    }
    .modal-container h3 {
        font-size: 1.25rem;
    }
}

.article-tags {
    margin: 1rem 0;
    font-size: 0.9rem;
}
.tag {
    display: inline-block;
    background: var(--color-gray-100);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    margin-right: 0.5rem;
    text-decoration: none;
    color: var(--color-primary);
}
.tag:hover {
    background: var(--color-accent-light);
}

.all-tags {
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
}
.all-tags h3 {
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 5px;
}
.tags-cloud .tag {
    background: white;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    text-decoration: none;
    transition: all 0.2s;
}
.tags-cloud .tag:hover {
    background: var(--color-accent);
    color: white;
}
.tags-cloud .tag.active {
    background: var(--color-primary);
    color: white;
}
.tag-count {
    font-size: 0.7rem;
    opacity: 0.7;
}

.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-gray-200);
}
.related-articles h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}
.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}
.related-article-item {
    background-color: rgba(var(--color-surface-rgb), 0.4);
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: transform 0.2s;
}
.related-article-item:hover {
    transform: translateY(-3px);
}
.related-article-item h4 {
    margin-bottom: 0.5rem;
}
.related-article-item h4 a {
    text-decoration: none;
    color: var(--color-primary);
}
.related-article-item .article-date {
    font-size: 0.8rem;
    color: var(--color-gray-500);
    margin-bottom: 0.5rem;
}


/* ===== СТИЛИ ДЛЯ ТЕЛА СТАТЬИ ===== */
.article-content {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--color-text);
    margin-bottom: 4rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-primary);
}

.article-content h1 {
    margin-top: 4rem;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.article-content h2 {
    margin-top: 4rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.25rem;
}

.article-content p {
    margin-bottom: 1.25rem;
    text-align: justify; /* выравнивание по ширине */
    hyphens: auto;
}

.article-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--color-accent);
}

/* Списки */
.article-content ul,
.article-content ol {
    margin: 1rem 0 1.5rem 3rem;
    padding-left: 0;
    color: var(--color-text-light);
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.55;
    color: var(--color-text-light);
}

.article-content ul li {
    list-style-type: disc;
}

.article-content ol li {
    list-style-type: decimal;
}

/* Цитаты */
.article-content blockquote {
    margin: 1.5rem 0 1.5rem 2rem;
    padding: 1rem 1.5rem;
    background: var(--color-surface);
    border-left: 4px solid var(--color-accent);
    font-style: italic;
    color: var(--color-text-light);
    border-radius: var(--radius-sm);
}

.article-content blockquote p {
    margin-bottom: 0;
}

/* Таблицы */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    overflow-x: auto;
    display: block;
}

.article-content th,
.article-content td {
    border: 1px solid var(--color-gray-300);
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
}

.article-content th {
    background-color: var(--color-gray-100);
    font-weight: 600;
}

.article-content tr:nth-child(even) {
    background-color: var(--color-gray-50);
}

/* Изображения */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

/* Подчёркивание и выделение */
.article-content strong {
    font-weight: 700;
    color: var(--color-primary);
}

.article-content em {
    font-style: italic;
}

/* Горизонтальная линия */
.article-content hr {
    margin: 2rem 0;
    border: 0;
    height: 1px;
    background: var(--color-gray-300);
}

@media (max-width: 768px) {
    .article-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}