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

/* ===== ROOT VARIABLES & GLOBAL STYLES ===== */
:root {
    --bg-color: #F8F9FA;
    --text-color: #212529;
    --primary-color: #4A90E2;
    --accent-color: #50E3C2;
    --border-color: #DEE2E6;
    --header-height: 70px;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Manrope', sans-serif;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
    line-height: 1.3;
}

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

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

ul {
    list-style: none;
}

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

/* ===== HEADER ===== */
.header {
    background-color: #FFFFFF;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

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

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

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 25px;
}

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

.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__nav-link--cta {
    background-color: var(--primary-color);
    color: #FFFFFF;
    padding: 8px 20px;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.header__nav-link--cta:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.header__nav-link--cta::after {
    display: none;
}

.header__burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
}

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

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

.footer__logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    display: block;
}

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

.footer__tagline {
    font-size: 14px;
    color: #6c757d;
}

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

.footer__list li {
    margin-bottom: 12px;
}

.footer__link {
    font-size: 15px;
    color: #495057;
}

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

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

.footer__icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.footer__address {
    display: flex;
    align-items: flex-start;
    color: #495057;
    font-size: 15px;
}

.footer__bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: #6c757d;
}

/* ===== RESPONSIVE STYLES (Mobile-First) ===== */
@media (max-width: 992px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header__nav {
        display: none; /* Hide navigation for mobile, will be handled by JS */
    }
    .header__burger-menu {
        display: block;
    }
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer__list--contacts .footer__link, .footer__address {
        justify-content: center;
    }
    .footer__column--logo {
        grid-row: 1; /* Make logo first on mobile */
    }
}

/* ===== HERO SECTION ===== */
.hero {
    display: flex;
    align-items: center;
    min-height: calc(100vh - var(--header-height));
    padding: 60px 0;
}

.hero__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

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

.hero__title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    min-height: 125px; /* Резервируем место под заголовок */
}

/* Эффект курсора для анимации печати */
.hero__title::after {
    content: '|';
    animation: blink 0.7s infinite;
    font-weight: 400;
    color: var(--primary-color);
}

@keyframes blink {
    50% { opacity: 0; }
}

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

.hero__cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #FFFFFF;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 16px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

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

.hero__image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    object-fit: cover;
}

/* Адаптивность для Hero Section */
@media (max-width: 992px) {
    .hero__title {
        font-size: 40px;
        min-height: 105px;
    }
}

@media (max-width: 768px) {
    .hero {
        text-align: center;
        min-height: auto;
    }
    .hero__container {
        flex-direction: column-reverse; /* Картинка сверху на мобильных */
    }
    .hero__title {
        font-size: 36px;
        min-height: 95px;
    }
    .hero__subtitle {
        font-size: 16px;
    }
    .hero__image-wrapper {
        margin-bottom: 30px;
        width: 100%;
    }
}

/* ===== GLOBAL SECTION STYLES ===== */
.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
}

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

/* ===== SERVICES SECTION ===== */
.services {
    padding: 80px 0;
    background-color: #FFFFFF; /* Отличаем секцию от фона body */
}

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

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

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

.services__icon-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    margin-bottom: 25px;
}

.services__icon {
    width: 30px;
    height: 30px;
    color: #FFFFFF;
}

.services__card-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

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

/* Адаптивность для Services Section */
@media (max-width: 992px) {
    .services__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .services {
        padding: 60px 0;
    }
    .section-title {
        font-size: 30px;
    }
    .section-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }
    .services__card {
        padding: 30px 25px;
    }
}
/* ===== CASES SECTION ===== */
.cases {
    padding: 80px 0;
}

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

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

/* Модификатор для реверса колонок */
.cases__item--reversed .cases__image-wrapper {
    order: 2;
}

.cases__image-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.cases__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cases__image:hover {
    transform: scale(1.05);
}

.cases__tag {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--text-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.cases__title {
    font-size: 28px;
    margin-bottom: 15px;
}

.cases__description {
    color: #495057;
    margin-bottom: 30px;
}

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

.cases__result-item {
    display: flex;
    align-items: center;
    font-size: 16px;
}

.cases__result-icon {
    color: var(--primary-color);
    width: 22px;
    height: 22px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Адаптивность для Cases Section */
@media (max-width: 992px) {
    .cases__item {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .cases__item--reversed .cases__image-wrapper {
        order: -1; /* Ставим картинку сверху */
    }
    .cases__content {
        text-align: center;
    }
    .cases__results {
        align-items: center;
    }
    .cases__result-item {
        justify-content: center;
        text-align: left;
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .cases {
        padding: 60px 0;
    }
    .cases__wrapper {
        gap: 60px;
    }
    .cases__title {
        font-size: 24px;
    }
}

/* ===== PROCESS SECTION ===== */
.process {
    padding: 80px 0;
    background-color: #FFFFFF;
}

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

/* Декоративная линия */
.process__timeline::before {
    content: '';
    position: absolute;
    top: 30px; /* На уровне центра иконки */
    left: 10%;
    right: 10%;
    height: 2px;
    background-image: linear-gradient(to right, var(--border-color) 50%, transparent 50%);
    background-size: 15px 2px;
    background-repeat: repeat-x;
    z-index: 0;
}

.process__step {
    position: relative;
    z-index: 1;
    text-align: center;
}

.process__icon-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--primary-color);
    margin-bottom: 20px;
    position: relative;
}

.process__icon {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

.process__step-number {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 10px;
}

.process__step-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.process__step-description {
    font-size: 15px;
    color: #495057;
}

/* Адаптивность для Process Section */
@media (max-width: 992px) {
    .process__timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    .process__timeline::before {
        display: none; /* Скрываем горизонтальную линию */
    }
}

@media (max-width: 768px) {
    .process {
        padding: 60px 0;
    }
    .process__timeline {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    /* Вертикальная линия для мобильных */
    .process__timeline::before {
        display: block;
        top: 30px;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: auto;
        background-image: linear-gradient(to bottom, var(--border-color) 50%, transparent 50%);
        background-size: 2px 15px;
    }
    .process__step:last-child .process__content {
        padding-bottom: 0;
    }
    .process__content {
        padding-left: 0;
        text-align: center;
    }
}

/* ===== BLOG SECTION ===== */
.blog {
    padding: 80px 0;
}

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

.blog-card {
    background-color: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.blog-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.blog-card__link:hover .blog-card__title {
    color: var(--primary-color);
}

.blog-card__image-wrapper {
    width: 100%;
    height: 200px;
}

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

.blog-card__content {
    padding: 25px;
}

.blog-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
}

.blog-card__category {
    font-weight: 500;
    color: var(--primary-color);
}

.blog-card__title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 20px;
    min-height: 84px; /* Резервируем место под 3 строки */
    transition: color 0.3s ease;
}

.blog-card__read-more {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--primary-color);
}

.blog-card__arrow {
    width: 18px;
    height: 18px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.blog-card__link:hover .blog-card__arrow {
    transform: translateX(5px);
}

/* Адаптивность для Blog Section */
@media (max-width: 992px) {
    .blog__grid {
        grid-template-columns: 1fr;
    }
    .blog-card__title {
        min-height: auto;
    }
}

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

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

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

.contact__title {
    font-size: 36px;
    margin-bottom: 20px;
}

.contact__description {
    font-size: 18px;
    line-height: 1.7;
    color: #495057;
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

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

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

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

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

.contact__submit-button {
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 500;
    background-color: var(--primary-color);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    display: none; /* Initially hidden */
}

.form-message--success {
    background-color: #d1e7dd;
    color: #0f5132;
    display: block;
}

.form-message--error {
    background-color: #f8d7da;
    color: #842029;
    display: block;
}

/* Адаптивность для Contact Section */
@media (max-width: 992px) {
    .contact__wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .contact__info {
        text-align: center;
    }
}

/* ===== COOKIE POP-UP ===== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #FFFFFF;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 20px 0;
    z-index: 1100;
    transform: translateY(0);
    transition: transform 0.4s ease-out;
}

.cookie-popup--hidden {
    transform: translateY(100%);
}

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

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

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

.cookie-popup__button {
    background-color: var(--primary-color);
    color: #FFFFFF;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

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


/* ===== STYLES FOR LEGAL PAGES (privacy.html, terms.html etc.) ===== */
.pages {
    padding: 80px 0;
}

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

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

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

.pages ul {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}

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

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

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

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

/* Адаптивность для доп. элементов */
@media (max-width: 768px) {
    .cookie-popup__container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .pages {
        padding: 60px 0;
    }
    .pages h1 {
        font-size: 32px;
    }
    .pages h2 {
        font-size: 24px;
    }
}