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

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors */
    --background-color: #F9FAFB;
    --text-color: #111827;
    --text-color-light: #6B7280;
    --accent-color: #4f46e5;
    --accent-color-hover: #4338ca;
    --surface-color: #FFFFFF;
    --border-color: #E5E7EB;

    /* Fonts */
    --body-font: 'Manrope', sans-serif;
    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;

    /* Other */
    --header-height: 5rem;
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* ==================== BASE ==================== */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--background-color);
    color: var(--text-color);
}

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

ul {
    list-style: none;
}

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

/* ==================== REUSABLE CSS CLASSES ==================== */
.container {
    max-width: 1120px;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-color);
}

/* ==================== HEADER ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--background-color);
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header__container {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__toggle {
    display: none; /* Hidden on desktop */
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-color);
}

.nav__list {
    display: flex;
    align-items: center;
    column-gap: 2.5rem;
}

.nav__link {
    font-weight: 500;
    color: var(--text-color-light);
    transition: var(--transition);
    position: relative;
    padding-bottom: 0.25rem;
}

.nav__link:hover, .nav__link.active-link {
    color: var(--accent-color);
}

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

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

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
    padding-bottom: 0;
    color: var(--text-color-light);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem 2rem;
    padding-bottom: 4rem;
}

.footer__logo {
    display: inline-block;
    margin-bottom: 1rem;
}

.footer__description {
    font-size: var(--small-font-size);
    line-height: 1.6;
}

.footer__title {
    font-size: var(--h3-font-size);
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.footer__nav-list,
.footer__contact-list {
    display: flex;
    flex-direction: column;
    row-gap: 0.75rem;
}

.footer__link {
    font-size: var(--normal-font-size);
    transition: var(--transition);
}

.footer__link:hover {
    color: var(--accent-color);
    padding-left: 0.25rem;
}

.footer__contact-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.footer__contact-icon {
    flex-shrink: 0;
    margin-top: 0.25rem;
    width: 18px; /* Fixed width for icons */
}

.footer__bottom {
    border-top: 1px solid var(--border-color);
}

.footer__bottom-container {
    padding: 1.5rem 0;
    text-align: center;
}

.footer__copyright {
    font-size: var(--small-font-size);
}


/* ==================== MEDIA QUERIES ==================== */
@media screen and (max-width: 767px) {
    .container {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .header__toggle {
        display: block;
    }

    .header__nav {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        transition: var(--transition);
        padding-top: 2rem;
    }

    /* Show menu */
    .show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        row-gap: 2rem;
    }
    
    .nav__link {
       font-size: var(--h3-font-size);
       color: var(--text-color);
    }
}

@media screen and (min-width: 1150px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==================== BUTTONS ==================== */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}

.button--primary {
    background-color: var(--accent-color);
    color: #fff;
}

.button--primary:hover {
    background-color: var(--accent-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

.button__icon {
    width: 20px;
    height: 20px;
}


/* ==================== HERO ==================== */
.hero {
    padding-top: var(--header-height); /* отступ от шапки */
    min-height: 90vh;
    display: flex;
    align-items: center;
}

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

.hero__title {
    font-size: var(--h1-font-size);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero__description {
    font-size: var(--h3-font-size);
    color: var(--text-color-light);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 550px;
}

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

.hero__image {
    width: 100%;
    max-width: 450px;
    border-radius: var(--border-radius);
    z-index: 1;
}

/* Добавляем медиа-запрос для десктопной версии Hero секции */
@media screen and (min-width: 768px) {
    .hero {
        min-height: 100vh;
    }
    
    .hero__container {
        grid-template-columns: 1fr 0.8fr;
        gap: 2rem;
    }
    
    .hero__title {
        font-size: 3.5rem; /* Увеличим шрифт на больших экранах */
    }
}

/* ==================== REUSABLE SECTION STYLES ==================== */
.section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.section__header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section__title {
    font-size: var(--h2-font-size);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.section__subtitle {
    font-size: var(--normal-font-size);
    color: var(--text-color-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==================== CASES ==================== */
.cases {
    background-color: var(--surface-color);
}

.cases__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

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

.case-card__image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
}

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

.case-card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Позволяет футеру ссылки прижаться к низу */
}

.case-card__tag {
    display: inline-block;
    background-color: #eef2ff; /* Light indigo background */
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: var(--small-font-size);
    font-weight: 500;
    margin-bottom: 1rem;
    align-self: flex-start; /* Чтобы тег не растягивался */
}

.case-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.case-card__description {
    font-size: var(--normal-font-size);
    color: var(--text-color-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Занимает все доступное пространство */
}

.case-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    font-weight: 500;
    transition: var(--transition);
    margin-top: auto; /* Прижимает ссылку к низу карточки */
}

.case-card__link:hover {
    gap: 0.75rem;
}

.case-card__link i {
    transition: var(--transition);
    width: 18px;
    height: 18px;
}

/* ==================== APPROACH ==================== */
.approach {
    background-color: var(--background-color); /* Или var(--surface-color) для контраста */
}

.approach__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem 2rem;
    margin-top: 4rem;
}

.approach__step {
    text-align: center;
}

.approach__icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #eef2ff; /* Light indigo background */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    transition: var(--transition);
}

.approach__icon-wrapper i {
    color: var(--accent-color);
    width: 32px;
    height: 32px;
}

.approach__step:hover .approach__icon-wrapper {
    background-color: var(--accent-color);
}

.approach__step:hover .approach__icon-wrapper i {
    color: #fff;
}

.approach__step-title {
    font-size: var(--h3-font-size);
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.approach__step-description {
    color: var(--text-color-light);
    line-height: 1.6;
}

/* ==================== BLOG ==================== */
.blog {
    background-color: var(--surface-color);
}

.blog__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

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

.article-card__image-link {
    display: block;
    aspect-ratio: 16 / 9;
}

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

.article-card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card__meta {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    margin-bottom: 0.75rem;
}

.article-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-card__title a {
    color: var(--text-color);
    transition: var(--transition);
}

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

.article-card__excerpt {
    color: var(--text-color-light);
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.article-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    font-weight: 500;
    transition: var(--transition);
    margin-top: auto; /* Прижимает ссылку к низу */
}

.article-card__read-more:hover {
    gap: 0.75rem;
}

.article-card__read-more i {
    width: 18px;
    height: 18px;
}

/* ==================== CONTACT ==================== */
.contact {
    background-color: var(--background-color);
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3.5rem;
}

@media screen and (min-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr 0.8fr;
    }
}

/* Form Styles */
.contact__form {
    display: grid;
    gap: 1.5rem;
}

.form__group {
    display: flex;
    flex-direction: column;
}

.form__label {
    font-size: var(--small-font-size);
    font-weight: 500;
    color: var(--text-color-light);
    margin-bottom: 0.5rem;
}

.form__input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    transition: var(--transition);
}

.form__input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form__group--checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: var(--small-font-size);
}

.form__group--checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 1em;
    height: 1em;
}

.form__group--checkbox label {
    color: var(--text-color-light);
    line-height: 1.5;
}

.form__group--checkbox a {
    color: var(--accent-color);
    text-decoration: underline;
}

.contact__button {
    width: 100%;
    justify-content: center;
}

.form__message {
    font-size: var(--small-font-size);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    display: none; /* Hidden by default */
}

.form__message.success {
    background-color: #d1fae5;
    color: #065f46;
    display: block;
}

.form__message.error {
    background-color: #fee2e2;
    color: #991b1b;
    display: block;
}


/* Contact Info Styles */
.contact__info-title {
    font-size: var(--h3-font-size);
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact__info-description {
    color: var(--text-color-light);
    margin-bottom: 2rem;
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    background-color: var(--surface-color);
    color: var(--text-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 200;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    transform: translateY(200%);
    transition: transform 0.5s ease-in-out;
}

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

.cookie-popup__text {
    font-size: var(--small-font-size);
}

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

.cookie-popup__button {
    padding: 0.75rem 1.25rem;
    flex-shrink: 0;
}

/* Responsive for smaller screens */
@media screen and (max-width: 767px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
    }
}
/* ==================== STATIC PAGES (privacy, terms, etc.) ==================== */
.pages {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
    background-color: var(--surface-color);
    min-height: 100vh;
}

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

.pages h1 {
    font-size: var(--h1-font-size);
    margin-bottom: 2rem;
}

.pages h2 {
    font-size: var(--h2-font-size);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.pages p {
    font-size: var(--normal-font-size);
    line-height: 1.8;
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
}

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

.pages li {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-color-light);
}

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

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