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

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors */
    --background-color: #F8F9FA;
    --text-color: #212529;
    --primary-color: #087E8B;
    --accent-color: #E57A44;
    --border-color: #DEE2E6;
    --white-color: #FFFFFF;

    /* Typography */
    --header-font: 'Montserrat', sans-serif;
    --body-font: 'Inter', sans-serif;

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: 1rem;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--header-font);
    color: var(--primary-color);
}

ul {
    list-style: none;
}

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

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

/* ==================== REUSABLE CSS CLASSES ==================== */
.container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ==================== HEADER ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

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

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

.header__list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header__link {
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.header__link--button {
    background-color: var(--accent-color);
    color: var(--white-color);
    padding: 0.5rem 1.25rem;
    border-radius: var(--border-radius);
}

.header__link--button:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* Mobile Nav will be added later if needed */

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--white-color);
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
    color: #6c757d;
}

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

.footer__logo {
    font-family: var(--header-font);
    font-size: 1.75rem;
    color: var(--primary-color);
    font-weight: 700;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer__tagline {
    font-size: 0.9rem;
}

.footer__title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-color);
}

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

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

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

.footer__list--contact .footer__item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.footer__list--contact i {
    width: 16px;
    height: 16px;
    margin-top: 4px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.footer__bottom {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ==================== MEDIA QUERIES (Mobile First) ==================== */
@media screen and (max-width: 768px) {
    /* Basic nav adjustments for mobile, a full hamburger menu can be added later */
    .header__nav {
        /* For now, we hide the text links and only show a "Menu" or an icon */
        /* This part will be fully developed with JS later */
        display: none; 
    }
    
    .header__container {
        justify-content: center; /* Center logo if nav is hidden */
    }
}

/* ==================== BUTTONS ==================== */
.button {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--header-font);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

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

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


/* ==================== HERO SECTION ==================== */
.hero {
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 4rem;
    overflow: hidden; /* Important for AOS animations */
}

.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: #6c757d;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image {
    max-width: 500px;
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ==================== MEDIA QUERIES (for Hero section) ==================== */
@media screen and (min-width: 768px) {
    .hero__content {
        text-align: left;
    }

    .hero__description {
        margin-left: 0;
        margin-right: 0;
    }
}


@media screen and (min-width: 992px) {
    .hero {
        padding-top: calc(var(--header-height) + 4rem);
        padding-bottom: 5rem;
    }
    
    .hero__container {
        grid-template-columns: 1fr 1fr; /* Two columns on large screens */
        gap: 4rem;
    }

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

/* ==================== REUSABLE CSS CLASSES (Updated) ==================== */
.container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.section__title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

/* ==================== SERVICES SECTION ==================== */
.services {
    padding-top: 4rem;
    padding-bottom: 4rem;
    background-color: var(--white-color);
}

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

.service-card {
    background-color: var(--background-color);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.service-card__icon {
    margin-bottom: 1rem;
}

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

.service-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.service-card__description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.7;
}

/* ==================== MEDIA QUERIES (for Services section) ==================== */
@media screen and (min-width: 992px) {
    .services {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .section__title {
        font-size: 2.5rem;
    }
    
    .services__grid {
        gap: 2rem;
    }
}

/* ==================== CASES SECTION ==================== */
.cases {
    padding-top: 4rem;
    padding-bottom: 4rem;
    background-color: var(--background-color);
}

.cases__wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.case-study {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.case-study__image {
    width: 100%;
    border-radius: var(--border-radius);
}

.case-study__category {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.case-study__title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.case-study__details p {
    margin-bottom: 1rem;
    color: #6c757d;
}

.case-study__results-title {
    font-size: 1.1rem;
    font-family: var(--body-font);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.case-study__results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.case-study__results-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.case-study__results-list i {
    color: var(--primary-color);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ==================== MEDIA QUERIES (for Cases section) ==================== */
@media screen and (min-width: 992px) {
    .cases {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .cases__wrapper {
        gap: 4rem;
    }
    
    .case-study {
        grid-template-columns: 1fr 1fr;
        padding: 3rem;
        gap: 3rem;
    }

    .case-study--reversed .case-study__visual {
        order: 1; /* This moves the image to the right */
    }
}

/* ==================== BLOG SECTION ==================== */
.blog {
    padding-top: 4rem;
    padding-bottom: 4rem;
    background-color: var(--white-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;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.article-card__image-wrapper {
    overflow: hidden;
}

.article-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-card__image {
    transform: scale(1.05);
}

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

.article-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.article-card__category {
    background-color: rgba(8, 126, 139, 0.1);
    color: var(--primary-color);
    padding: 0.2rem 0.6rem;
    border-radius: calc(var(--border-radius) / 2);
    font-weight: 600;
}

.article-card__date {
    color: #6c757d;
}

.article-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-family: var(--header-font);
    color: var(--text-color);
    line-height: 1.4;
}

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

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

.article-card__excerpt {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.article-card__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    transition: var(--transition);
}

.article-card__link i {
    width: 16px;
    height: 16px;
    transition: var(--transition);
}

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

.article-card__link:hover i {
    transform: translateX(4px);
}


/* ==================== MEDIA QUERIES (for Blog section) ==================== */
@media screen and (min-width: 992px) {
    .blog {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}
/* ==================== ABOUT US SECTION ==================== */
.about {
    padding-top: 4rem;
    padding-bottom: 4rem;
    background-color: var(--background-color);
}

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

.about__description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.about__values-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about__values-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.about__values-list i {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--primary-color);
    margin-top: 4px;
}

.about__values-list div {
    display: flex;
    flex-direction: column;
}

.about__values-list strong {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.about__values-list span {
    color: #6c757d;
}

.about__visual {
    position: relative;
}

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

/* ==================== MEDIA QUERIES (for About Us section) ==================== */
@media screen and (min-width: 992px) {
    .about {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .about__container {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
    }
}

/* Добавьте это в .section__title, если его еще нет, или создайте новый класс */
.section__subtitle {
    text-align: center;
    max-width: 600px;
    margin: -2rem auto 3rem;
    color: #6c757d;
}

/* ==================== CONTACT SECTION ==================== */
.contact {
    padding-top: 4rem;
    padding-bottom: 4rem;
    background-color: var(--white-color);
}

.contact__wrapper {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

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

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

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

/* Стили для невалидных полей (опционально, но полезно) */
.form__input:invalid {
    border-color: #dc3545;
}

.form__group--captcha {
    align-items: flex-start;
}

#captcha-label {
    font-weight: 600;
}

.form__group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.form__group--checkbox input[type="checkbox"] {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

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

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

.contact__success-message {
    display: none; /* Скрыто по умолчанию */
    text-align: center;
    padding: 2rem;
}

.contact__success-message i {
    width: 60px;
    height: 60px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ==================== MEDIA QUERIES (for Contact section) ==================== */
@media screen and (min-width: 768px) {
    .contact__wrapper {
        padding: 3rem;
    }
}

@media screen and (min-width: 992px) {
    .contact {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

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

.cookie-popup.show {
    bottom: 0; /* Show the popup */
}

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

.cookie-popup p {
    margin: 0;
    flex-grow: 1;
}

.cookie-popup a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.cookie-popup__button {
    padding: 0.6rem 1.5rem;
    flex-shrink: 0;
}

/* ==================== STATIC PAGES (Privacy, Terms, etc.) ==================== */
.pages {
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 4rem;
    background-color: var(--white-color);
}

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

.pages h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.pages h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

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

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

.pages li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

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

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

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