/*=============== БАЗОВЫЕ СТИЛИ И ПЕРЕМЕННЫЕ ===============*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Montserrat:wght@600;700&display=swap');

:root {
  /* Цвета */
  --primary-color: #00A79D;
  --primary-color-alt: #00897B;
  --dark-bg: #2C3E50;
  --light-bg: #F4F7F5;
  --text-dark: #333333;
  --text-light: #ECF0F1;
  --border-color: #E0E0E0;

  /* Шрифты */
  --font-headings: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Прочее */
  --header-height: 5rem;
}

/* Сброс стилей и общие настройки */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  color: var(--text-dark);
}

ul {
  list-style: none;
}

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

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

/*=============== ХЕДЕР ===============*/
.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background-color: rgba(244, 247, 245, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}

/* Эффект для хедера при скролле */
.header--scrolled {
    border-bottom: 1px solid var(--border-color);
}

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

.header__logo {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-dark);
  transition: color .3s;
}
.header__logo:hover {
  color: var(--primary-color);
}

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

.header__menu-link {
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: color .3s;
}

.header__menu-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s cubic-bezier(0.19, 1, 0.22, 1);
}

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

.header__menu-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header__toggle, .header__close {
  display: none;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text-dark);
}


/*=============== ФУТЕР ===============*/
.footer {
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

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

.footer__logo {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.footer__tagline {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer__title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

.footer__link {
    color: var(--text-light);
    opacity: 0.8;
    transition: opacity .3s, padding-left .3s;
}

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

.footer__list--contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.footer__list--contact span {
    opacity: 0.8;
}

.footer__bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(236, 240, 241, 0.2);
    font-size: 0.9rem;
    opacity: 0.7;
}


/*=============== АДАПТИВНОСТЬ ===============*/
@media (max-width: 768px) {
  .header__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right .4s cubic-bezier(0.19, 1, 0.22, 1);
  }

  .header__menu--show {
    right: 0;
  }
  
  .header__menu-list {
    flex-direction: column;
    gap: 3rem;
  }
  
  .header__menu-link {
    font-size: 1.5rem;
  }

  .header__toggle, .header__close {
    display: block;
  }

  .header__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
  }
}

/*=============== BUTTONS ===============*/
.button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-family: var(--font-headings);
    font-weight: 600;
    text-align: center;
    border: 2px solid transparent;
    transition: all .3s ease;
}

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

.button--primary:hover {
    background-color: var(--primary-color-alt);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 167, 157, 0.2);
}

/*=============== HERO СЕКЦІЯ ===============*/
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    overflow: hidden;
}

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

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

.hero__title-accent {
    color: var(--primary-color);
    font-weight: 600;
}

.hero__description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
    opacity: 0.9;
}

.hero__animation-area {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.1);
}

.hero__icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    color: var(--primary-color);
    will-change: transform; /* Оптимизация для анимации */
}

/*=============== АДАПТИВНІСТЬ HERO ===============*/
@media (max-width: 992px) {
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + 3rem) 0 3rem;
        text-align: center;
    }
    .hero__container {
        grid-template-columns: 1fr;
    }
    .hero__content {
        order: 2; /* Текст будет под анимацией */
    }
    .hero__animation {
        order: 1;
    }
    .hero__description {
        margin-left: auto;
        margin-right: auto;
    }
    .hero__title {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 1.8rem;
    }
    .hero__animation-area {
        max-width: 300px;
    }
    .hero__icon {
        width: 50px;
        height: 50px;
    }
}

/*=============== ОБЩИЕ СТИЛИ ДЛЯ СЕКЦИЙ ===============*/
.section {
    padding: 6rem 0 2rem;
}

.section-title,
.section-subtitle {
    text-align: center;
}

.section-subtitle {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.section-description {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
    opacity: 0.9;
}

/*=============== СЕКЦИЯ ABOUT ===============*/
.about {
    background-color: #FFFFFF;
    padding: 6rem 0;
}

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

.about__card {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform .3s ease, box-shadow .3s ease;
}

.about__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(44, 62, 80, 0.1);
}

.about__card-icon {
    display: inline-flex;
    padding: 1rem;
    background-color: var(--light-bg);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

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

.about__card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about__card-description {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.8;
}


/*=============== АДАПТИВНІСТЬ ABOUT ===============*/
@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 4rem 0 1rem;
    }

    .about {
        padding: 4rem 0;
    }
}

/*=============== СЕКЦИЯ EXAMPLES ===============*/
.examples {
    padding: 6rem 0;
}

.examples__slider-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 16px 32px rgba(44, 62, 80, 0.15);
    border: 1px solid var(--border-color);
}

.examples__slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.examples__slide {
    flex: 0 0 100%;
    width: 100%;
    display: grid;
    grid-template-columns: 40% 60%;
    background-color: #FFFFFF;
}

.examples__slide-image {
    width: 100%;
    height: 100%;
}
.examples__slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.examples__slide-content {
    padding: 3rem;
    position: relative;
}

.examples__slide-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.examples__slide-content h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

.examples__comparison {
    display: grid;
    gap: 1.5rem;
}

.examples__before,
.examples__after {
    position: relative;
    padding-left: 1.5rem;
}

.examples__before::before,
.examples__after::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.examples__before::before {
    background-color: #F44336; /* Red for "before" */
}

.examples__after::before {
    background-color: #4CAF50; /* Green for "after" */
}

.examples__comparison h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.examples__comparison p {
    font-size: 0.95rem;
    opacity: 0.8;
}

.examples__slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background-color .3s, transform .3s;
}
.examples__slider-nav:hover {
    background-color: #fff;
    transform: translateY(-50%) scale(1.1);
}
.examples__slider-nav--prev { left: 1rem; }
.examples__slider-nav--next { right: 1rem; }

.examples__slider-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
}

.examples__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background-color .3s;
}

.examples__dot--active {
    background-color: #fff;
}


/*=============== АДАПТИВНІСТЬ EXAMPLES ===============*/
@media (max-width: 768px) {
    .examples__slide {
        grid-template-columns: 1fr;
    }
    .examples__slide-image {
        height: 250px; /* Фиксированная высота для картинки на мобильных */
    }
    .examples__slide-content {
        padding: 2rem;
    }
    .examples__slide-content h3 {
        font-size: 1.5rem;
    }
    .examples__slider-nav {
        bottom: 1rem;
        top: auto;
    }
}

/*=============== СЕКЦИЯ TOOLS ===============*/
.tools {
    background-color: #FFFFFF;
    padding: 6rem 0;
}

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

.tools__card {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease, box-shadow .3s ease;
}

.tools__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(44, 62, 80, 0.1);
}

.tools__card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tools__card-icon {
    flex-shrink: 0;
    color: var(--primary-color);
}

.tools__card-icon i {
    width: 28px;
    height: 28px;
}

.tools__card-title {
    font-size: 1.25rem;
}

.tools__card-tag {
    align-self: flex-start;
    background-color: var(--primary-color-alt);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.tools__card-description {
    flex-grow: 1; /* Makes description take up available space */
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.tools__card-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    transition: gap .3s ease;
}

.tools__card-link:hover {
    gap: 0.8rem;
}

.tools__card-link-icon {
    width: 16px;
    height: 16px;
    transition: transform .3s ease;
}

.tools__card-link:hover .tools__card-link-icon {
    transform: translateX(4px);
}

/*=============== СЕКЦИЯ CASES ===============*/
.cases {
    padding: 6rem 0;
}

.cases__accordion {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cases__accordion-item {
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cases__accordion-item.is-open {
    box-shadow: 0 12px 24px rgba(44, 62, 80, 0.1);
}

.cases__accordion-header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
    cursor: pointer;
    background-color: transparent;
    border: none;
    text-align: left;
    font-size: 1.15rem;
    font-family: var(--font-headings);
    font-weight: 600;
    gap: 1rem;
    color: var(--text-dark);
}

.cases__header-arrow {
    margin-left: auto;
    transition: transform 0.4s ease;
}

.cases__accordion-item.is-open .cases__header-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.cases__accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.cases__accordion-body {
    padding: 0 1.5rem 1.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: center;
}

.cases__content-text h4 {
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.cases__content-text p {
    font-size: 0.95rem;
    opacity: 0.8;
}
.cases__content-text h4:first-child {
    margin-top: 0;
}

.cases__content-image img {
    width: 100%;
    border-radius: 0.5rem;
    object-fit: cover;
}

/*=============== АДАПТИВНІСТЬ CASES ===============*/
@media (max-width: 768px) {
    .cases__accordion-body {
        grid-template-columns: 1fr;
    }
    .cases__content-image {
        order: -1; /* Image on top */
        margin-bottom: 1.5rem;
    }
    .cases__accordion-header {
        font-size: 1rem;
        padding: 1rem;
    }
}

/*=============== СЕКЦИЯ CONTACT ===============*/
.contact {
    padding: 6rem 0;
    background-color: #FFFFFF;
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact__description {
    margin: 1.5rem 0 2.5rem;
    opacity: 0.9;
}

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

.contact__info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}
.contact__info-item i {
    color: var(--primary-color);
}

.contact__form-wrapper {
    background-color: var(--light-bg);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.contact__form-group {
    margin-bottom: 1.5rem;
}
.contact__form-group--captcha {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

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

.contact__form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color .3s, box-shadow .3s;
}

.contact__form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 167, 157, 0.2);
}

textarea.contact__form-input {
    resize: vertical;
}

.contact__form-button {
    width: 100%;
}

.contact__form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none; /* Скрыто по умолчанию */
}

.contact__form-message--success {
    background-color: #D4EDDA;
    color: #155724;
    display: block;
}

.contact__form-message--error {
    background-color: #F8D7DA;
    color: #721C24;
    display: block;
}

/*=============== COOKIE POPUP ===============*/
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    z-index: 200;
    transform: translateY(100%);
    transition: transform .5s ease-in-out;
}

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

.cookie-popup__text {
    opacity: 0.9;
}
.cookie-popup__link {
    color: var(--primary-color);
    text-decoration: underline;
}

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

/*=============== АДАПТИВНІСТЬ CONTACT & COOKIE ===============*/
@media (max-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr;
    }
}

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

/*=============== СТИЛИ ДЛЯ СТРАНИЦ ПОЛИТИК ===============*/
.pages {
    padding: calc(var(--header-height) + 4rem) 0 6rem;
    background-color: #FFFFFF;
}

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

/* Отдельно для заголовка, чтобы он мог быть шире, если нужно */
.pages .container > h1 {
    max-width: none;
    text-align: center;
}


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

.pages h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.pages p,
.pages ul {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    opacity: 0.9;
}

.pages ul {
    list-style-position: inside;
    list-style-type: disc;
    padding-left: 1rem;
}

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

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

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

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


/*=============== АДАПТИВНОСТЬ СТРАНИЦ ПОЛИТИК ===============*/
@media (max-width: 768px) {
    .pages {
        padding-top: calc(var(--header-height) + 2rem);
        padding-bottom: 4rem;
    }
    .pages h1 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }
    .pages h2 {
        font-size: 1.5rem;
    }
    .pages p,
    .pages ul {
        font-size: 1rem;
    }
}