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

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors */
    --color-bg: #F5F5F5;
    --color-text: #1A2E35;
    --color-primary: #3A6B7E;
    --color-accent: #D4A373;
    --color-white: #FFFFFF;
    --color-footer-bg: #1A2E35;
    --color-footer-text: #E0E0E0;

    /* Typography */
    --font-family-headings: 'Merriweather', serif;
    --font-family-body: 'Lato', sans-serif;
    
    /* Spacing */
    --container-width-lg: 1120px;
    --container-width-md: 960px;
}

/* ==================== BASE STYLES ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

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

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

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

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-family-headings);
    color: var(--color-text);
    font-weight: 700;
}

.container {
    max-width: var(--container-width-lg);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==================== HEADER ==================== */
.header {
    background-color: var(--color-bg);
    border-bottom: 1px solid #e0e0e0;
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

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

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

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

.header__nav {
    display: none; /* Mobile first: hide on small screens */
}

.header__menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header__menu-link {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    position: relative;
    padding-bottom: 0.5rem;
}

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

.header__menu-link:hover::after {
    width: 100%;
}

.header__menu-link--cta {
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.header__menu-link--cta:hover {
    background-color: #c59362;
    color: var(--color-white);
}

.header__menu-link--cta::after {
    display: none; /* Remove underline effect for CTA button */
}

/* ==================== MAIN (for spacing) ==================== */
.main {
    margin-top: 80px; /* Adjust based on header height */
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding-top: 4rem;
}

.footer__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-bottom: 4rem;
}

.footer__column--brand {
    text-align: center;
}

.footer__logo {
    font-family: var(--font-family-headings);
    font-size: 1.75rem;
    color: var(--color-white);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer__tagline {
    font-size: 0.9rem;
    font-style: italic;
    color: #a0a0a0;
}

.footer__title {
    font-family: var(--font-family-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1.5rem;
    text-align: center;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.footer__link {
    color: var(--color-footer-text);
}

.footer__link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.footer__address {
    font-style: normal;
    line-height: 1.6;
    text-align: center;
}

.footer__bottom {
    border-top: 1px solid #33474d;
    padding: 1.5rem 0;
}

.footer__bottom-container {
    text-align: center;
    font-size: 0.9rem;
    color: #a0a0a0;
}


/* ==================== MEDIA QUERIES (ADAPTIVE) ==================== */

/* For tablets and larger */
@media (min-width: 768px) {
  .hero__content {
    text-align: left;
}
.hero__description {
    margin: 0 0 2.5rem 0;
}

    .header__nav {
        display: block; /* Show navigation */
    }
    
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }

    .footer__column--brand, .footer__title, .footer__list, .footer__address {
        text-align: left;
        align-items: flex-start;
    }
}

/* For desktops */
@media (min-width: 1024px) {
    .footer__container {
        grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    }
}
/* For desktops and larger */
@media (min-width: 992px) {
    .hero__container {
        grid-template-columns: 1fr 1fr;
    }

    .hero__visual {
        display: block; /* Показываем анимацию на больших экранах */
    }

    .hero__title {
        font-size: 3.5rem;
    }
}


/* ==================== BUTTONS ==================== */
.button {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 0.9rem 2.2rem;
    border-radius: 5px;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: 2px solid transparent;
}

.button:hover {
    background-color: #c59362;
    color: var(--color-white);
    transform: translateY(-3px);
}

/* ==================== HERO ==================== */
.hero {
    padding: 6rem 0;
    min-height: calc(90vh - 80px); /* 80px - высота хедера */
    display: flex;
    align-items: center;
    overflow: hidden;
}

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

.hero__content {
    text-align: center;
}

.hero__title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero__description {
    font-size: 1.1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero__visual {
    display: none; /* Скрываем на мобильных устройствах для фокуса на тексте */
}

.hero__animation-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 10px;
}

.hero__shape {
    position: absolute;
    border-radius: 50%;
    background-color: var(--color-primary);
    opacity: 0.1;
    animation: floatAnimation 20s infinite ease-in-out alternate;
}

@keyframes floatAnimation {
    0% {
        transform: translateY(20px) translateX(0) scale(1);
    }
    100% {
        transform: translateY(-20px) translateX(20px) scale(1.1);
    }
}

/* ==================== SERVICES ==================== */
.services {
    padding: 6rem 0;
    background-color: #fdfdfd; /* Слегка отличающийся фон для разделения секций */
}

.services__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.services__title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.services__subtitle {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
}

.services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.services__card {
    background-color: var(--color-white);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9e9e9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.services__card-icon {
    margin-bottom: 1.5rem;
}

.services__card-icon svg {
    width: 48px;
    height: 48px;
    color: var(--color-accent);
}

.services__card-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.services__card-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
}

/* For tablets and larger */
@media (min-width: 768px) {
    .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== CASES ==================== */
.cases {
    padding: 6rem 0;
    background-color: var(--color-bg);
}

.cases__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.cases__title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.cases__subtitle {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
}

.cases__wrapper {
    display: grid;
    gap: 3rem;
}

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

.case-item__image img {
    width: 100%;
    height: 250px; /* Фиксированная высота для мобильных */
    object-fit: cover;
    display: block;
}

.case-item__content {
    padding: 2rem;
}

.case-item__category {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.case-item__title {
    font-family: var(--font-family-headings);
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.case-item__description {
    color: #555;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.case-item__results {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 5px;
}

.case-item__metric {
    font-family: var(--font-family-headings);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}

.case-item__result-text {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
}

/* ==================== MEDIA QUERIES (ADAPTIVE) ==================== */

/* For tablets and larger */
@media (min-width: 768px) {
    .case-item {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .case-item__image img {
        height: 100%; /* Растягиваем на всю высоту карточки */
    }

    /* Меняем порядок колонок для реверсивного блока */
    .case-item--reversed .case-item__image {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }

    .case-item--reversed .case-item__content {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
}

/* ==================== PROCESS ==================== */
.process {
    padding: 6rem 0;
    background-color: #fdfdfd;
}

.process__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 5rem;
}

.process__title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.process__subtitle {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
}

.process__timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 3rem; /* Отступ для линии и кружков */
}

/* Вертикальная линия для мобильной версии */
.process__timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15px;
    bottom: 15px;
    width: 3px;
    background-color: #e0e0e0;
    border-radius: 2px;
}

.process__item {
    position: relative;
    margin-bottom: 3rem;
}
.process__item:last-child {
    margin-bottom: 0;
}

.process__step {
    position: absolute;
    left: -1.7rem; /* Смещаем влево, чтобы центр был на линии */
    top: 0;
    width: 3.4rem;
    height: 3.4rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 4px solid #fdfdfd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family-headings);
    font-weight: 700;
    font-size: 1.2rem;
    z-index: 2;
}

.process__content {
    background-color: var(--color-white);
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    padding: 1.5rem 2rem;
}

.process__content-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.process__content-description {
    color: #555;
    line-height: 1.7;
}

/* ==================== MEDIA QUERIES (ADAPTIVE) ==================== */

/* For tablets and larger */
@media (min-width: 768px) {
    .process__timeline {
        padding-left: 0; /* Убираем отступ */
    }

    /* Центральная линия для десктопной версии */
    .process__timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .process__item {
        width: 50%;
        padding: 0 2.5rem; /* Отступы от центральной линии */
    }

    /* Элементы справа */
    .process__item:nth-child(even) {
        margin-left: 50%;
    }
    
    /* Элементы слева */
    .process__item:nth-child(odd) {
        margin-left: 0;
    }

    .process__step {
        left: 50%;
        transform: translateX(-50%);
    }

    /* "Стрелочка" (указатель) для контентных блоков */
    .process__content::before {
        content: '';
        position: absolute;
        top: 20px;
        width: 0;
        height: 0;
        border-style: solid;
    }

    /* Стрелочка для левых элементов */
    .process__item:nth-child(odd) .process__content::before {
        right: -10px;
        border-width: 10px 0 10px 10px;
        border-color: transparent transparent transparent var(--color-white);
    }
    
    /* Стрелочка для правых элементов */
    .process__item:nth-child(even) .process__content::before {
        left: -10px;
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--color-white) transparent transparent;
    }
}

/* ==================== ABOUT ==================== */
.about {
    padding: 6rem 0;
    background-color: var(--color-bg);
}

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

.about__image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about__title {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.about__subtitle {
    font-family: var(--font-family-body);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 2rem;
}

.about__description {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about__values {
    list-style: none;
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.about__values-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

.about__values-item svg {
    color: var(--color-accent);
    width: 22px;
    height: 22px;
}

/* ==================== MEDIA QUERIES (ADAPTIVE) ==================== */

/* For desktops */
@media (min-width: 992px) {
    .about__container {
        grid-template-columns: 1fr 1.2fr; /* Тексту немного больше места */
        gap: 5rem;
    }
}

/* ==================== CONTACT ==================== */
.contact {
    padding: 6rem 0;
    background-color: #fdfdfd;
}

.contact__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.contact__title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.contact__subtitle {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
}

.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e9e9e9;
}

.contact__info-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.contact__info-text {
    color: #555;
    margin-bottom: 2rem;
}

.contact__info-list {
    list-style: none;
    display: grid;
    gap: 1.5rem;
}

.contact__info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact__info-item svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.contact__info-item a,
.contact__info-item span {
    font-weight: 700;
    color: var(--color-text);
}

/* Form Styles */
.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form__input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-family-body);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(58, 107, 126, 0.2);
}

.form__group--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form__group--checkbox input {
    margin-top: 4px;
}

.form__group--checkbox label {
    font-weight: normal;
    font-size: 0.9rem;
    line-height: 1.5;
}

.form__group--checkbox a {
    text-decoration: underline;
}

.contact__form-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.form__success-message {
    display: none; /* Initially hidden */
    text-align: center;
    padding: 2rem;
    border: 2px solid var(--color-primary);
    border-radius: 8px;
    background-color: #f0f5f7;
}

.form__success-message svg {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.form__success-message h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ==================== MEDIA QUERIES (ADAPTIVE) ==================== */

@media (min-width: 992px) {
    .contact__wrapper {
        grid-template-columns: 1fr 1.5fr;
        padding: 3rem;
        gap: 4rem;
    }
    .contact__form-button {
        width: auto;
    }
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Initially hidden */
    left: 0;
    width: 100%;
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 1.5rem 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: bottom 0.5s ease-in-out;
}

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

.cookie-popup__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}

.cookie-popup__text {
    line-height: 1.6;
}

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

.cookie-popup__button {
    background-color: var(--color-accent);
    color: var(--color-white);
    border: none;
    padding: 0.7rem 2rem;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap; /* Не переносить текст кнопки */
}

.cookie-popup__button:hover {
    background-color: #c59362;
}

/* ==================== MEDIA QUERIES (ADAPTIVE) ==================== */

@media (min-width: 768px) {
    .cookie-popup__container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ==================== STYLES FOR STATIC PAGES ==================== */
.pages {
    padding: 4rem 0 6rem 0;
    background-color: var(--color-white);
    margin-top: 80px; /* Отступ от фиксированного хедера, если он будет на этих страницах */
}

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

.pages h1, .pages h2, .pages h3 {
    font-family: var(--font-family-headings);
    color: var(--color-text);
}

.pages h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 1rem;
}

.pages h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.pages p {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.5rem;
}

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

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

.pages ul, .pages ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.pages li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    color: #333;
}

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