/* GLOBAL STYLES */
:root {
    --bg-color: #F5F7FA;
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --accent-color: #38B2AC;
    --accent-hover: #2C7A7B;
    --surface-color: #FFFFFF;
    --border-color: #E2E8F0;

    --font-primary: 'Lato', sans-serif;
    --font-secondary: 'Playfair Display', serif;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

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

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

ul {
    list-style: none;
}

/* HEADER */
.header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

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

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

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

.header__nav-link {
    color: var(--text-secondary);
    font-weight: 700;
    padding: 0.5rem 0;
    position: relative;
}

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

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

.header__nav-link:hover {
    color: var(--text-primary);
}

.header__nav-link--button {
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.header__nav-link--button:hover {
    background-color: var(--accent-hover);
    color: #fff;
}

.header__nav-link--button::after {
    display: none;
}

.header__burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}


/* FOOTER */
.footer {
    background-color: var(--text-primary);
    color: #A0AEC0; /* Lighter gray for footer text */
    padding: 4rem 0 0;
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--text-secondary);
}

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

.footer__tagline {
    font-size: 0.9rem;
}

.footer__heading {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    color: var(--surface-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.footer__link {
    color: #A0AEC0;
}
.footer__link:hover {
    color: var(--surface-color);
}

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

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

.footer__bottom {
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* RESPONSIVENESS */
@media (max-width: 992px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header__nav {
        display: none; /* Will be handled by JS */
    }

    .header__burger-menu {
        display: block;
    }
    
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__list--contact li {
        justify-content: center;
    }
}
/* SHARED COMPONENTS */
.button {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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


/* HERO SECTION */
.hero {
    padding: 6rem 0;
    background-color: var(--surface-color);
}

.hero__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero__content {
    flex: 1;
    max-width: 550px;
}

.hero__title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    min-height: 180px; /* Резервируем место под анимированный текст */
}

.hero__title .hero__title-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero__image-wrapper {
    flex: 1;
    max-width: 500px;
}

.hero__image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(45, 55, 72, 0.1);
}

/* RESPONSIVENESS for Hero */
@media (max-width: 992px) {
    .hero {
        padding: 4rem 0;
        text-align: center;
    }

    .hero__container {
        flex-direction: column;
    }

    .hero__content {
        order: 2; /* Текст будет под картинкой */
        max-width: 100%;
    }

    .hero__image-wrapper {
        order: 1; /* Картинка будет над текстом */
        margin-bottom: 2rem;
    }

    .hero__title {
        font-size: 2.75rem;
        min-height: auto; /* Убираем высоту на мобильных */
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 576px) {
    .hero__title {
        font-size: 2.25rem;
    }
}

/* REUSABLE SECTION STYLES */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}


/* SERVICES SECTION */
.services {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.service-card {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px -10px rgba(45, 55, 72, 0.15);
}

.service-card__icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #e6fffa; /* Light teal background */
}

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

.service-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-primary);
    font-weight: 700;
}

.service-card__description {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* RESPONSIVENESS for Services */
@media (max-width: 992px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services {
        padding: 4rem 0;
    }
    .section-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 576px) {
    .services__grid {
        grid-template-columns: 1fr;
    }
}

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

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

.case-study {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.case-study--reversed {
    flex-direction: row-reverse;
}

.case-study__image-link {
    flex: 1;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(45, 55, 72, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-study__image-link:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(45, 55, 72, 0.15);
}

.case-study__image {
    width: 100%;
    display: block;
}

.case-study__content {
    flex: 1;
}

.case-study__category {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.case-study__title {
    font-size: 2rem;
    font-family: var(--font-secondary);
    margin-bottom: 1rem;
}

.case-study__description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.case-study__link {
    font-weight: 700;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

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

.case-study__link i {
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
}

.case-study__link:hover i {
    transform: translateX(5px);
}

/* RESPONSIVENESS for Cases */
@media (max-width: 992px) {
    .case-study {
        gap: 2rem;
    }
    .case-study__title {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .cases {
        padding: 4rem 0;
    }
    .cases__wrapper {
        gap: 4rem;
    }
    .case-study,
    .case-study--reversed {
        flex-direction: column;
        text-align: center;
    }
    .case-study__content {
        max-width: 500px;
    }
}

/* BLOG SECTION */
.blog {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.blog__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-post-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(45, 55, 72, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px -10px rgba(45, 55, 72, 0.15);
}

.blog-post-card__image-link {
    display: block;
}

.blog-post-card__image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

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

.blog-post-card__meta {
    margin-bottom: 0.75rem;
}

.blog-post-card__date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.blog-post-card__title {
    font-size: 1.25rem;
    font-family: var(--font-secondary);
    margin-bottom: 0.75rem;
}

.blog-post-card__title a {
    color: var(--text-primary);
}

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

.blog-post-card__excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.blog-post-card__read-more {
    font-weight: 700;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.blog-post-card__read-more:hover {
    color: var(--accent-hover);
}

.blog__view-all-wrapper {
    text-align: center;
    margin-top: 4rem;
}


/* RESPONSIVENESS for Blog */
@media (max-width: 992px) {
    .blog__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog {
        padding: 4rem 0;
    }
}

@media (max-width: 576px) {
    .blog__grid {
        grid-template-columns: 1fr;
    }
}

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

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr; /* Image takes slightly less space */
    align-items: center;
    gap: 4rem;
}

.about__image-wrapper {
    width: 100%;
}

.about__image {
    width: 100%;
    border-radius: 12px;
}

.section-header--left-aligned {
    text-align: left;
    margin: 0 0 1.5rem 0;
    max-width: none;
}

.about__text {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.about__stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-item__number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    color: var(--accent-color);
    line-height: 1;
}
/* Adding plus and percent symbols via pseudo-elements */
.stat-item:nth-child(1) .stat-item__number::after,
.stat-item:nth-child(2) .stat-item__number::after {
    content: '+';
}
.stat-item:nth-child(3) .stat-item__number::after {
    content: '%';
}

.stat-item__label {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* RESPONSIVENESS for About */
@media (max-width: 992px) {
    .about__grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .about__image-wrapper {
        max-width: 500px;
        margin: 0 auto;
    }
    .about__content {
        text-align: center;
    }
    .section-header--left-aligned {
        text-align: center;
        margin: 0 auto 1.5rem;
    }
    .about__stats {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .about {
        padding: 4rem 0;
    }
    .about__stats {
        flex-direction: column;
        gap: 2rem;
    }
}

/* CONTACT SECTION */
.contact {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background-color: var(--surface-color);
    padding: 4rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.contact__info-title {
    font-size: 1.75rem;
    font-family: var(--font-secondary);
    margin-bottom: 1rem;
}

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

.contact__info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.contact__info-list a,
.contact__info-list span {
    color: var(--text-secondary);
    font-weight: 700;
}
.contact__info-list a:hover {
    color: var(--accent-color);
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group__label {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group__input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group__input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(56, 178, 172, 0.2);
}

.form-group--captcha {
    align-items: flex-start;
}
#captcha-label {
    font-weight: 700;
    margin-top: 0.8rem;
    margin-right: 0.5rem;
}
.form-group--captcha {
    flex-direction: row;
    align-items: center;
}

.form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}
.form-group--checkbox label {
    color: var(--text-secondary);
}
.form-group--checkbox input[type="checkbox"] {
    width: 1.25em;
    height: 1.25em;
}

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

.form-message {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    display: none; /* Hidden by default */
}

.form-message--success {
    display: block;
    background-color: #e6fffa;
    color: #234e52;
}

.form-message--error {
    display: block;
    background-color: #fed7d7;
    color: #822727;
}

/* RESPONSIVENESS for Contact */
@media (max-width: 992px) {
    .contact__wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .contact {
        padding: 4rem 0;
    }
}
/* COOKIE POPUP */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px; /* Ограничиваем ширину на больших экранах */
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    z-index: 2000;
    transform: translateY(200%);
    transition: transform 0.5s ease-in-out;
}

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

.cookie-popup__text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.cookie-popup__button {
    padding: 0.6rem 1.2rem;
    flex-shrink: 0; /* Чтобы кнопка не сжималась */
}

/* RESPONSIVENESS for Cookie Popup */
@media (max-width: 576px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
}
/* GENERIC PAGES STYLING (privacy.html, terms.html, etc.) */
.pages {
    padding: 4rem 0;
    background-color: var(--surface-color);
}

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

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

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

.pages p,
.pages ul {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.pages ul {
    list-style: disc;
    padding-left: 25px;
}

.pages li {
    margin-bottom: 0.75rem;
}

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

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

.pages a:hover {
    text-decoration: none;
}