/* ------------------- */
/* 0. GLOBAL STYLES   */
/* ------------------- */

/* Google Fonts Import - уже подключены в HTML через <link> */

/* CSS Variables */
:root {
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Playfair Display', serif;

    --color-background: #F8F7F4;
    --color-text: #2c3e50;
    --color-primary: #0077B6;
    --color-accent: #F39C12;
    --color-footer-bg: #2c3e50;
    --color-footer-text: #F8F7F4;
    --color-border: #e0e0e0;
}

/* Base & Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    line-height: 1.2;
    font-weight: 700;
}

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

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

ul {
    list-style: none;
}

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

/* Utility Classes */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}


/* ------------------- */
/* 1. HEADER        */
/* ------------------- */

.header {
    background-color: rgba(248, 247, 244, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

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

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

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

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

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

.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-out;
}

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

.header__menu-link--cta {
    background-color: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.header__menu-link--cta:hover {
    background-color: var(--color-accent);
    color: var(--color-text);
    transform: translateY(-2px);
}

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

.header__burger {
    display: none; /* Скрыт на десктопе */
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.header__burger-line {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-text);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* ------------------- */
/* 2. FOOTER        */
/* ------------------- */

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

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

.footer__logo {
    font-family: var(--font-secondary);
    font-size: 2rem;
    color: #fff;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.footer__tagline {
    font-size: 0.9rem;
    color: rgba(248, 247, 244, 0.7);
}

.footer__heading {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer__link {
    color: rgba(248, 247, 244, 0.7);
}

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

.footer__list--contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.footer__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--color-accent);
}

.footer__address {
    font-style: normal;
    color: rgba(248, 247, 244, 0.7);
}

.footer__bottom {
    border-top: 1px solid rgba(248, 247, 244, 0.1);
    padding: 1.5rem 0;
}

.footer__bottom-container {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(248, 247, 244, 0.5);
}


/* ------------------- */
/* RESPONSIVENESS    */
/* ------------------- */

@media (max-width: 768px) {
    .header__nav {
        display: none; /* Скрываем навигацию на мобильных */
    }

    .header__burger {
        display: block; /* Показываем бургер */
    }

    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer__list--contact li {
        justify-content: center;
    }
}

/* ------------------- */
/* 3. HERO SECTION     */
/* ------------------- */

.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
    background: url('img/jakub-zerdzicki-ip7GFn5JqX8-unsplash.jpg') no-repeat center center/cover;
    color: #fff;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.6); /* Затемнение на основе --color-text */
}

.hero__container {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero__title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* Стили для анимации заголовка */
.hero__title span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero__title span.visible {
    opacity: 1;
    transform: translateY(0);
}


.hero__subtitle {
    font-size: 1.25rem;
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

/* Общий класс для кнопок */
.button {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    border-radius: 50px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.hero__cta {
    background-color: var(--color-accent);
    color: var(--color-text);
}

.hero__cta:hover {
    background-color: #ffb84d; /* Более светлый оттенок --color-accent */
    color: var(--color-text);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}


/* Адаптивность для Hero */
@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
    }
    
    .hero__title {
        font-size: 2.5rem;
    }

    .hero__subtitle {
        font-size: 1.1rem;
    }
}

/* ---------------------- */
/* 4. SERVICES SECTION    */
/* ---------------------- */

.services {
    padding: 5rem 0;
    background-color: var(--color-background);
}

/* Общий класс для заголовков секций */
.section-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 3.5rem;
}

.section-header__title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.section-header__subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

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

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

.services__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(44, 62, 80, 0.08);
}

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

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

.services__card-title {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--color-text);
}

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


/* Адаптивность для Services */
@media (max-width: 768px) {
    .services {
        padding: 4rem 0;
    }
    
    .section-header__title {
        font-size: 2.2rem;
    }
}

/* ------------------- */
/* 5. APPROACH SECTION */
/* ------------------- */

.approach {
    padding: 5rem 0;
    background-color: #fff; /* Белый фон для визуального отделения */
}

.approach__timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.approach__step {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.approach__step:last-child {
    margin-bottom: 0;
}

.approach__step-decorator {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.approach__step-number {
    font-family: var(--font-secondary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    background-color: var(--color-background);
    border: 2px solid var(--color-border);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.approach__step-line {
    width: 2px;
    height: 100%;
    background-color: var(--color-border);
}

.approach__step-content {
    padding-top: 1rem;
}

.approach__step-title {
    font-size: 1.75rem;
    margin-bottom: 0.8rem;
}

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

/* Адаптивность для Approach */
@media (max-width: 768px) {
    .approach {
        padding: 4rem 0;
    }

    .approach__step {
        grid-template-columns: 60px 1fr;
        gap: 1.5rem;
    }

    .approach__step-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .approach__step-title {
        font-size: 1.5rem;
    }
}

/* ------------------- */
/* 6. CASES SECTION    */
/* ------------------- */

.cases {
    padding: 5rem 0;
    background-color: var(--color-background);
}

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

.cases__card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.05);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cases__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(44, 62, 80, 0.1);
}

.cases__card-image-wrapper {
    overflow: hidden;
}

.cases__card-image-wrapper img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease-out;
}

.cases__card:hover .cases__card-image-wrapper img {
    transform: scale(1.05);
}

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

.cases__card-tag {
    display: inline-block;
    background-color: rgba(0, 119, 182, 0.1);
    color: var(--color-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.cases__card-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-secondary);
}

.cases__card-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    flex-grow: 1; /* Занимает все доступное пространство */
    margin-bottom: 1.5rem;
}

.cases__card-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--color-primary);
    align-self: flex-start; /* Прижимает ссылку к левому краю */
}

.cases__card-link:hover {
    color: var(--color-accent);
}

.cases__card-link i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.cases__card-link:hover i {
    transform: translateX(4px);
}

/* ------------------- */
/* 7. BLOG SECTION     */
/* ------------------- */

.blog {
    padding: 5rem 0;
    background-color: #fff; /* Чередуем фон для визуального разделения */
}

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

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

.blog__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(44, 62, 80, 0.1);
}

.blog__card-image-link {
    display: block;
    overflow: hidden;
}

.blog__card-image-link img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease-out;
}

.blog__card:hover .blog__card-image-link img {
    transform: scale(1.05);
}

.blog__card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog__card-meta {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0.75rem;
}

.blog__card-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-secondary);
}

.blog__card-title a {
    color: var(--color-text);
}
.blog__card-title a:hover {
    color: var(--color-primary);
}


.blog__card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.blog__card-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--color-primary);
    align-self: flex-start;
}

.blog__card-link:hover {
    color: var(--color-accent);
}

.blog__card-link i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.blog__card-link:hover i {
    transform: translateX(4px);
}

.blog__cta-wrapper {
    text-align: center;
}

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

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

/* ------------------- */
/* 8. CONTACT SECTION  */
/* ------------------- */

.contact {
    padding: 5rem 0;
    background-color: var(--color-background);
}

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

.contact__info .section-header__title {
    text-align: left;
}
.contact__info .section-header__subtitle {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.contact__details {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact__details-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact__details-item i {
    color: var(--color-primary);
    width: 24px;
    height: 24px;
}

.contact__form-container {
    background-color: #fff;
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 25px rgba(44, 62, 80, 0.07);
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form__input-wrapper {
    position: relative;
}

.form__input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    width: 18px;
    height: 18px;
}

.form__input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-primary);
    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(0, 119, 182, 0.1);
}

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

.form__group--checkbox input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
}

.form__label--checkbox {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
}
.form__label--checkbox a {
    text-decoration: underline;
}

.contact__submit-button {
    width: 100%;
    background-color: var(--color-accent);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
.contact__submit-button:hover {
    background-color: #ffb84d;
    color: var(--color-text);
}
.contact__submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.form__message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    display: none; /* Скрыто по умолчанию */
}
.form__message--success {
    background-color: #d4edda;
    color: #155724;
    display: block;
}
.form__message--error {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

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

/* -------------------- */
/* 9. COOKIE POP-UP     */
/* -------------------- */

.cookie-popup {
    position: fixed;
    bottom: -100%; /* Изначально скрыт */
    left: 0;
    right: 0;
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 1.5rem;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transition: bottom 0.5s ease-in-out;
}

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

.cookie-popup__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.cookie-popup__text {
    font-size: 0.9rem;
}

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

.cookie-popup__button {
    background-color: var(--color-accent);
    color: var(--color-text);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

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

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

/* -------------------- */
/* 10. POLICY PAGES     */
/* -------------------- */

.pages {
    padding: 4rem 0;
    background-color: #fff;
}

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

.pages h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

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

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

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

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

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

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