/* ГЛОБАЛЬНЫЕ СТИЛИ И ПЕРЕМЕННЫЕ */
:root {
    --background-color: #F8F7F4;
    --text-color: #333333;
    --primary-color: #0A4D68;
    --secondary-color: #05BFDB;
    --footer-bg: #222222;
    --footer-text: #EAEAEA;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --container-width: 1200px;
    --container-padding: 15px;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background-color: transparent;
}

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


/* СТИЛИ ХЕДЕРА */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(248, 247, 244, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(10, 77, 104, 0.1);
}

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

.nav__list {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav__link {
    position: relative;
    padding: 5px 0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

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

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

.nav__link--button {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
}

.nav__link--button:hover {
    background-color: var(--secondary-color);
    color: #fff;
    transform: translateY(-2px);
}

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

.burger {
    display: none;
    width: 30px;
    height: 20px;
    position: relative;
}

.burger__line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    position: absolute;
    left: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.burger__line:nth-child(1) { top: 0; }
.burger__line:nth-child(2) { top: 50%; transform: translateY(-50%); }
.burger__line:nth-child(3) { bottom: 0; }


/* СТИЛИ ФУТЕРА */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0;
}

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

.footer__column--logo {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.footer__logo {
    color: #fff;
    margin-bottom: 20px;
}

.footer__copyright {
    font-size: 14px;
    color: rgba(234, 234, 234, 0.7);
}

.footer__title {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 20px;
    color: #fff;
}

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

.footer__link {
    color: rgba(234, 234, 234, 0.8);
    transition: color 0.3s, padding-left 0.3s;
}

.footer__link:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer__item--contact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer__icon {
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--secondary-color);
}

.footer__address {
    font-style: normal;
}


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

@media (max-width: 768px) {
    .nav {
        display: none; /* Будет реализовано мобильное меню */
    }

    .burger {
        display: block;
    }
    
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer__column {
        align-items: center;
    }

    .footer__item--contact {
       justify-content: center;
    }

    .footer__column--logo {
        align-items: center;
    }
}

/*--------------------
    СТИЛИ СЕКЦИИ HERO
--------------------*/

.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px; /* Offset for fixed header */
}

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

.hero__container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero__content {
    max-width: 800px;
    margin: 0 auto;
}

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

.hero__subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 40px;
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 35px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 4px 15px rgba(10, 77, 104, 0.2);
}

.button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(5, 191, 219, 0.3);
}

/* АДАПТИВНОСТЬ ДЛЯ HERO */
@media (max-width: 768px) {
    .hero__title {
        font-size: 42px;
    }

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

@media (max-width: 480px) {
    .hero__title {
        font-size: 32px;
    }

    .hero {
        min-height: 500px;
    }
}

/*--------------------
    ОБЩИЕ СТИЛИ СЕКЦИЙ
--------------------*/
.section-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 60px;
}

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

.section-header__subtitle {
    font-size: 18px;
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.7;
}

/*--------------------
  СТИЛИ СЕКЦИИ SERVICES
--------------------*/
.services {
    padding: 100px 0;
    background-color: #fff;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

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

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

.service-card__icon {
    margin-bottom: 25px;
}

.service-card__icon svg {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.service-card:hover .service-card__icon svg {
    color: var(--secondary-color);
}

.service-card__title {
    font-family: var(--font-heading);
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-card__text {
    font-size: 15px;
    line-height: 1.6;
}

/* АДАПТИВНОСТЬ ДЛЯ СЕКЦИЙ */
@media (max-width: 768px) {
    .section-header__title {
        font-size: 36px;
    }
    .section-header__subtitle {
        font-size: 16px;
    }
    .services {
        padding: 80px 0;
    }
}

/*--------------------
  СТИЛИ СЕКЦИИ CASES
--------------------*/
.cases {
    padding: 100px 0;
    background-color: var(--background-color);
}

.cases__tabs {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.cases__nav {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.cases__nav-button {
    flex: 1;
    padding: 20px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: var(--primary-color);
    opacity: 0.7;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.cases__nav-button:hover {
    background-color: #e9ecef;
    opacity: 1;
}

.cases__nav-button--active {
    opacity: 1;
    border-bottom-color: var(--secondary-color);
    background-color: #fff;
}

.case-item {
    display: none;
    padding: 40px;
    animation: fadeIn 0.5s ease;
}

.case-item--active {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 40px;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.case-item__title {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.case-item__block {
    margin-bottom: 25px;
}

.case-item__block h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
}

.case-item__block p {
    font-size: 15px;
    line-height: 1.6;
}

.case-item__result {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #F8F7F4;
    padding: 20px;
    border-radius: 8px;
}

.case-item__result-value {
    font-family: var(--font-heading);
    font-size: 48px;
    color: var(--secondary-color);
    line-height: 1;
}

.case-item__result-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.case-item__image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* АДАПТИВНОСТЬ ДЛЯ CASES */
@media (max-width: 992px) {
    .case-item--active {
        grid-template-columns: 1fr;
    }
    .case-item__image {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .cases__nav {
        flex-direction: column;
    }
    .cases__nav-button {
        border-bottom: 1px solid #dee2e6;
    }
    .cases__nav-button--active {
        border-bottom-color: #dee2e6;
        border-left: 4px solid var(--secondary-color);
    }
    .case-item__title {
        font-size: 24px;
    }
}

/*--------------------
  СТИЛИ СЕКЦИИ PROCESS
--------------------*/
.process {
    padding: 100px 0;
    background-color: #fff;
}

.process__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
}

/* Линия, соединяющая блоки */
.process__grid::before {
    content: '';
    position: absolute;
    top: 50px; /* Позиционируем по вертикали */
    left: 5%;
    width: 90%;
    height: 1px;
    background-color: #dee2e6;
    z-index: 1;
}

.process-step {
    position: relative;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    z-index: 2;
    border-top: 3px solid var(--secondary-color);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.03);
}

.process-step__number {
    position: absolute;
    top: -10px;
    right: 20px;
    font-family: var(--font-heading);
    font-size: 80px;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.05;
    z-index: 1;
    line-height: 1;
}

.process-step__content {
    position: relative;
    z-index: 2;
}

.process-step__title {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.process-step__text {
    font-size: 15px;
    line-height: 1.6;
}


/* АДАПТИВНОСТЬ ДЛЯ PROCESS */
@media (max-width: 992px) {
    .process__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .process__grid::before {
        display: none; /* Скрываем линию на планшетах */
    }
}

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

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

/*--------------------
  СТИЛИ СЕКЦИИ ABOUT
--------------------*/
.about {
    padding: 100px 0;
    background-color: var(--background-color);
}

.about__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    align-items: center;
}

.about__image-wrapper {
    width: 100%;
}

.about__image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(10, 77, 104, 0.15);
}

.about__title {
    font-family: var(--font-heading);
    font-size: 42px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about__lead {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 40px;
}

.about__values {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.value-item__icon svg {
    width: 32px;
    height: 32px;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.value-item__text h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.value-item__text p {
    font-size: 15px;
    line-height: 1.6;
}

/* АДАПТИВНОСТЬ ДЛЯ ABOUT */
@media (max-width: 992px) {
    .about__grid {
        grid-template-columns: 1fr;
    }
    .about__image-wrapper {
        margin-bottom: 40px;
    }
    .about__title {
        font-size: 36px;
    }
}

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

/*--------------------
  СТИЛИ СЕКЦИИ CONTACT
--------------------*/
.contact {
    padding: 100px 0;
    background-color: #fff;
}

.contact__wrapper {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--background-color);
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.07);
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}
.form-label__captcha-question {
    font-weight: 700;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 77, 104, 0.1);
}

.form-input.is-invalid {
    border-color: #e74c3c;
}

/* Стили для капчи и чекбокса */
.form-group--captcha {
    grid-column: 1 / -1; /* Растягиваем на всю ширину */
    max-width: 300px;
}

.form-group--checkbox {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.form-group--checkbox input[type="checkbox"] {
    width: 1.3em;
    height: 1.3em;
    accent-color: var(--primary-color);
}

.form-group--checkbox label {
    font-size: 14px;
    margin-bottom: 0;
}

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

.contact-form__button {
    width: 100%;
    margin-top: 30px;
    padding: 18px;
}

/* Сообщения формы */
.form-message {
    padding: 20px;
    margin-top: 30px;
    border-radius: 5px;
    text-align: center;
    font-size: 16px;
}
.form-message--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.form-message--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* Адаптивность для формы */
@media (max-width: 768px) {
    .contact {
        padding: 80px 0;
    }
    .contact__wrapper {
        padding: 30px;
    }
}

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

/*--------------------
  СТИЛИ COOKIE POP-UP
--------------------*/
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 20px 0;
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
}

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

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

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

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

.cookie-popup__button {
    padding: 10px 25px;
    background-color: var(--primary-color);
    flex-shrink: 0;
}
.cookie-popup__button:hover {
    background-color: var(--secondary-color);
}

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

/*-----------------------------
  СТИЛИ ДЛЯ СТРАНИЦ ПОЛИТИК (.pages)
-----------------------------*/
.pages {
    padding-top: 120px; /* 80px header + 40px margin */
    padding-bottom: 80px;
    background-color: #fff;
}

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

.pages h1, .pages h2, .pages h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1em;
}

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

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

.pages p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 1.5em;
}

.pages ul, .pages ol {
    padding-left: 25px;
    margin-bottom: 1.5em;
}

.pages li {
    margin-bottom: 0.8em;
    line-height: 1.8;
}

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

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

.pages strong {
    font-weight: 700;
}