/* Глобальные настройки */
:root {
    --primary-color: #007BFF;
    --primary-hover-color: #0056b3;
    --text-color: #212529;
    --secondary-text-color: #6c757d;
    --bg-color: #ffffff;
    --footer-bg-color: #f8f9fa;
    --border-color: #dee2e6;
    --header-height: 80px;
    --font-family-headings: 'Montserrat', sans-serif;
    --font-family-base: 'Lato', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

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

a:hover {
    color: var(--primary-hover-color);
    text-decoration: none;
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-family-headings);
    font-weight: 700;
    font-size: 24px;
    color: var(--text-color);
}
.logo:hover {
    color: var(--text-color);
}
.logo__img {
    width: 32px;
    height: 32px;
}

/* Хедер */
.header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

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

.nav__list {
    display: flex;
    gap: 30px;
}

.nav__link {
    font-family: var(--font-family-headings);
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
    position: relative;
    padding: 5px 0;
}

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

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

/* Бургер меню */
.burger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    z-index: 1010;
}

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

/* Футер */
.footer {
    background-color: var(--footer-bg-color);
    color: var(--secondary-text-color);
    padding-top: 60px;
    border-top: 1px solid var(--border-color);
}

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

.footer__column .logo {
    margin-bottom: 20px;
}

.footer__title {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 20px;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.footer__link--with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer__icon {
    width: 18px;
    height: 18px;
    color: var(--secondary-text-color);
}

.footer__item--address .footer__link--with-icon {
    align-items: flex-start;
}

.footer__bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
}

.footer__copyright {
    font-size: 14px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-color);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s ease-in-out;
        padding-top: 100px;
    }

    .nav.nav--open {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .nav__link {
        font-size: 20px;
    }

    .burger {
        display: block;
    }
    
    body.no-scroll {
        overflow: hidden;
    }

    /* Анимация бургера */
    .burger.burger--active .burger__line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .burger.burger--active .burger__line:nth-child(2) {
        opacity: 0;
    }
    .burger.burger--active .burger__line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/*--------------------
    Hero Section
--------------------*/
.hero {
    position: relative;
    padding: 120px 0;
    text-align: center;
    overflow: hidden;
    background-color: #f8f9fa; /* Фоновый цвет на случай, если JS отключен */
}

.hero__particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero__title {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    max-width: 900px;
}

.hero__subtitle {
    font-size: 18px;
    color: var(--secondary-text-color);
    margin-bottom: 40px;
    max-width: 650px;
}

.button {
    display: inline-block;
    padding: 15px 30px;
    font-family: var(--font-family-headings);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

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

    .hero__title {
        font-size: 36px;
    }

    .hero__subtitle {
        font-size: 16px;
    }
}

/*--------------------
    Shared Section Styles
--------------------*/
.section {
    padding: 80px 0;
}

.section__title {
    font-size: 36px;
    text-align: center;
    margin-bottom: 20px;
}

.section__subtitle {
    font-size: 18px;
    color: var(--secondary-text-color);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

/*--------------------
    Blog Section
--------------------*/
.blog__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.blog-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0; /* For animation */
    transform: translateY(20px); /* For animation */
}

.blog-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}


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

.blog-card__image-wrapper {
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
}

.blog-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card__body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card__category {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.blog-card__title {
    font-size: 20px;
    margin-bottom: 15px;
    flex-grow: 1;
}

.blog-card__excerpt {
    font-size: 15px;
    color: var(--secondary-text-color);
    margin-bottom: 20px;
}

.blog-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: auto;
}

.blog-card__link .blog-card__icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.blog-card__link:hover .blog-card__icon {
    transform: translateX(4px);
}

/* Адаптивность для секции */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    .section__title {
        font-size: 30px;
    }
    .section__subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }
}

/*--------------------
    Tools Section
--------------------*/
.tools {
    background-color: var(--footer-bg-color);
}

.tools__tabs {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.tools__nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tools__nav-button {
    flex: 1;
    padding: 20px;
    font-family: var(--font-family-headings);
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary-text-color);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

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

.tools__nav-button--active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tools__nav-icon {
    width: 20px;
    height: 20px;
}

.tools__content-panel {
    display: none;
    padding: 40px;
    animation: fadeIn 0.5s ease-in-out;
}

.tools__content-panel--active {
    display: block;
}

.tools__panel-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
}

.tools__image {
    width: 100%;
    border-radius: 8px;
}

.tools__content-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.tools__text-content p {
    margin-bottom: 30px;
    color: var(--secondary-text-color);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Адаптивность для Tools */
@media (max-width: 768px) {
    .tools__nav-button span {
        display: none;
    }
    .tools__nav-button {
        font-size: 14px;
        padding: 15px;
    }
    .tools__panel-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .tools__image-container {
        order: -1; /* Image appears on top on mobile */
        margin-bottom: 20px;
    }
     .tools__content-panel {
        padding: 30px 20px;
    }
}

/*--------------------
    Cases Section
--------------------*/
.cases__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.case-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0; /* For animation */
    transform: translateY(20px); /* For animation */
}

.case-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

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

.case-card__header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.case-card__avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.case-card__name {
    font-size: 18px;
    margin: 0;
}

.case-card__role {
    font-size: 14px;
    color: var(--secondary-text-color);
    margin: 0;
}

.case-card__quote {
    position: relative;
    padding-left: 35px;
    font-style: italic;
    color: var(--text-color);
    border: none;
    margin: 0;
}

.case-card__icon {
    position: absolute;
    top: -5px;
    left: 0;
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    opacity: 0.5;
}

.case-card__quote p {
    font-size: 15px;
}

/*--------------------
    About Section
--------------------*/
.about {
    background-color: var(--footer-bg-color);
}

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

.about__image-container {
    opacity: 0; /* For animation */
    transform: translateY(20px); /* For animation */
}

.about__image-container.is-visible {
    opacity: 1;
    transform: translateY(0);
}

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

.about__content {
    opacity: 0; /* For animation */
    transform: translateY(20px); /* For animation */
    transition-delay: 0.2s; /* Animate after the image */
}

.about__content.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.about__pre-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.about__title {
    font-size: 36px;
    margin-bottom: 20px;
    /* Overriding default section title styles */
    text-align: left;
}

.about__text {
    color: var(--secondary-text-color);
    margin-bottom: 30px;
    font-size: 16px;
}

.about__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.about__list-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.about__list-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    margin-top: 3px;
}

/* Адаптивность для About */
@media (max-width: 992px) {
    .about__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about__title {
        font-size: 30px;
    }
    .about__content {
       text-align: center;
    }
    .about__list-item {
        text-align: left;
    }
}

/*--------------------
    Contact Section
--------------------*/
.contact__wrapper {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.form__group {
    position: relative;
    margin-bottom: 30px;
}

.form__input {
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
    color: var(--text-color);
    border: none;
    border-bottom: 2px solid var(--border-color);
    outline: none;
    background-color: transparent;
    transition: border-color 0.3s;
}

.form__label {
    position: absolute;
    top: 12px;
    left: 0;
    font-size: 16px;
    color: var(--secondary-text-color);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form__input:focus,
.form__input:not(:placeholder-shown) {
    border-bottom-color: var(--primary-color);
}

.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
    top: -16px;
    font-size: 12px;
    color: var(--primary-color);
}

.form__group--checkbox {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.form__checkbox {
    margin-top: 5px;
    flex-shrink: 0;
}

.form__checkbox-label {
    font-size: 14px;
    color: var(--secondary-text-color);
    margin-left: 10px;
}

.form__checkbox-label a {
    text-decoration: underline;
}

.contact__button {
    width: 100%;
}

.form__message {
    display: none; /* Скрыто по умолчанию */
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
}

.form__message--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form__message--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Адаптивность */
@media (max-width: 768px) {
    .contact__wrapper {
        padding: 30px 20px;
    }
}

/*--------------------
    Cookie Pop-up
--------------------*/
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Start hidden */
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%;
    width: 600px;
    background-color: #fff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    padding: 25px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    z-index: 2000;
    transition: bottom 0.5s ease-in-out;
}

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

.cookie-popup__text {
    margin: 0;
    font-size: 15px;
    color: var(--secondary-text-color);
}

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

.cookie-popup__button {
    flex-shrink: 0;
    padding: 10px 20px;
}

@media (max-width: 768px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }
}

/*--------------------
    Policy Pages Styles
--------------------*/
.pages {
    padding: 80px 0;
}

.pages .container {
    max-width: 800px;
}

.pages h1 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
}

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

.pages p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--secondary-text-color);
    margin-bottom: 20px;
}

.pages a {
    text-decoration: underline;
}

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

.pages li {
    margin-bottom: 10px;
    color: var(--secondary-text-color);
}

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