/* Базовий CSS reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  scroll-behavior: smooth;
  height: 100%;
  width: 100%;
  font-family: sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  text-rendering: optimizeSpeed;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

ul, ol {
  list-style: none;
}

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

table {
  border-collapse: collapse;
  border-spacing: 0;
}
/* ----------- */


/* 1. Глобальные стили и переменные */
:root {
    --bg-primary: #0D1117;
    --bg-secondary: #161B22;
    --text-primary: #E6EDF3;
    --text-secondary: #8B949E;
    --accent-primary: #2F81F7;
    --border-color: #30363D;

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
}

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

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

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

ul {
    list-style: none;
}

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

/* 2. Хедер */
.header {
    background-color: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

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

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

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

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

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

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

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

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

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer__tagline {
    font-size: 0.9rem;
    max-width: 250px;
}

.footer__heading {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

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

.footer__link {
    color: var(--text-secondary);
    transition: color 0.3s ease, padding-left 0.3s ease;
}

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

.footer__contacts p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.footer__contact-icon {
    flex-shrink: 0;
}

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

/* 4. Адаптивность */
@media (max-width: 768px) {
    .header__nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 320px;
        height: 100%;
        background-color: var(--bg-secondary);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        z-index: 999;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .header__nav.is-active {
        display: flex;
        transform: translateX(0);
    }
    
    .header__nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .header__menu-toggle {
        display: block;
        z-index: 1001;
    }
}

/* 5. Hero Section */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    padding: 6rem 0;
    text-align: center;
    overflow: hidden; /* Важливо для фону */
    
    /* Фон зі згенерованим зображенням та ефектом паралаксу */
    background-image: url('../img/hero.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* <--- Той самий ефект паралаксу */
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(13, 17, 23, 0.8) 0%, rgba(13, 17, 23, 0.4) 100%);
    z-index: 1;
}

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

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem); /* Адаптивний розмір шрифту */
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    max-width: 800px; /* Обмеження ширини для кращої читабельності */
}

.hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-primary);
    margin: 1.5rem 0 2.5rem;
    max-width: 600px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* 6. Загальний стиль для кнопок */
.button {
    display: inline-block;
    background-color: var(--accent-primary);
    color: #FFFFFF;
    padding: 0.9rem 2.5rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(47, 129, 247, 0.2);
}

.button:hover {
    transform: translateY(-4px);
    background-color: #4A95F7; /* Трохи світліший синій при наведенні */
    box-shadow: 0 10px 25px rgba(47, 129, 247, 0.3);
    color: #FFFFFF;
}

/* 7. Адаптивність для Hero */
@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        /* Вимикаємо 'fixed' для мобільних, оскільки це може викликати проблеми з продуктивністю */
        background-attachment: scroll; 
    }

    .hero__title {
        line-height: 1.3;
    }
}
/* 8. Загальні стилі для секцій */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 2.75rem);
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 4rem;
}

/* 9. Секція Stories */
.stories {
    background-color: var(--bg-secondary);
    padding: 6rem 0;
}

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

.story-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.story-card__link-wrapper {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Дозволяє контенту розтягуватись */
}

.story-card__image-wrapper {
    height: 200px;
}

.story-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

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

.story-card__category {
    background-color: rgba(47, 129, 247, 0.1);
    color: var(--accent-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.story-card__title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.story-card__excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1; /* Займає вільний простір, штовхаючи футер вниз */
    margin-bottom: 1.5rem;
}

.story-card__footer {
    padding: 0 1.5rem 1.5rem;
}

.story-card__author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.story-card__author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.story-card__author-name {
    color: var(--text-primary);
    font-weight: 500;
}

.story-card__author-role {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

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

/* 10. Модификаторы для заголовков секций */
.section-title--left,
.section-subtitle--left {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

/* 11. Секция Insights */
.insights {
    background-color: var(--bg-primary); /* Возвращаемся к основному фону */
    padding: 6rem 0;
    overflow: hidden;
}

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

.insights__image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Декоративный фон для изображения */
.insights__image-bg {
    position: absolute;
    width: 90%;
    height: 90%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transform: rotate(-5deg);
    transition: transform 0.4s ease;
}

.insights__image {
    position: relative;
    z-index: 2;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.insights__image-wrapper:hover .insights__image-bg {
    transform: rotate(2deg) scale(1.02);
}

.insights__content {
    /* Контент в правой колонке */
}

.insights__list {
    list-style: none;
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.insights__list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.insights__list-item i {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
    margin-top: 5px; /* Для лучшего визуального выравнивания */
}

.insights__list-item strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* 12. Адаптивность для Insights */
@media (max-width: 992px) {
    .insights__grid {
        grid-template-columns: 1fr;
        gap: 5rem; /* Увеличиваем отступ при вертикальном расположении */
    }

    .section-title--left,
    .section-subtitle--left {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .insights__content {
        order: -1; /* Ставим текст над картинкой на мобильных */
    }
}
/* 13. Секция Community */
.community {
    background-color: var(--bg-secondary);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

/* 14. Лента логотипов */
.community__logos {
    width: 100%;
    overflow: hidden;
    margin-top: 4rem;
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.community__logos-slider {
    display: flex;
    width: fit-content;
    animation: marquee 40s linear infinite;
}

.community__logos-slider img {
    height: 40px;
    width: auto;
    margin: 0 3rem;
    filter: grayscale(1) opacity(0.5);
    transition: filter 0.3s ease;
}

.community__logos-slider:hover {
    animation-play-state: paused;
}

.community__logos-slider img:hover {
    filter: grayscale(0) opacity(1);
}

@keyframes marquee {
    from { transform: translateX(0%); }
    to { transform: translateX(-50%); }
}

/* 15. Сетка с отзывами */
.community__testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 5rem;
}

.testimonial-card {
    background-color: var(--bg-primary);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    position: relative;
}

.testimonial-card__icon {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    width: 48px;
    height: 48px;
    color: var(--border-color);
    z-index: 0;
    opacity: 0.5;
}

.testimonial-card__text {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 3px solid var(--accent-primary);
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-card__author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.testimonial-card__author-name {
    color: var(--text-primary);
    font-weight: 500;
}

.testimonial-card__author-role {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .community__testimonials-grid {
        grid-template-columns: 1fr;
    }
    .testimonial-card {
        padding: 2rem 1.5rem;
    }
}
/* 16. Секция CTA (Career) */
.cta-section {
    padding: 6rem 1.5rem;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-primary); /* Фоновый цвет */
    
    /* Декоративные градиенты для "техно" вида */
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(47, 129, 247, 0.1), transparent 35%),
        radial-gradient(circle at 85% 80%, rgba(47, 129, 247, 0.15), transparent 40%);
}

.cta-section__container {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-section .section-title {
    max-width: 600px;
}

.cta-section .section-subtitle {
    max-width: 650px;
    margin-bottom: 2.5rem;
}

.cta-section__button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    font-weight: 500;
}

.cta-section__button i {
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.cta-section__button:hover i {
    transform: translateX(5px);
}

/* 17. Секция Contact */
.contact-section {
    background-color: var(--bg-secondary);
    padding: 6rem 0;
}

.contact-form {
    max-width: 800px;
    margin: 4rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.form-label {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-input:focus,
.form-input:focus-visible {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.25);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: #f87171; /* red-400 */
    font-size: 0.85rem;
    padding-top: 0.3rem;
    display: none; /* Скрыто по умолчанию */
}

.form-group.has-error .form-input {
    border-color: #f87171;
}

.form-group.has-error .form-error {
    display: block; /* Показываем ошибку */
}

.contact-form__button {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.contact-form__button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--accent-primary); /* Чтобы не менялся цвет */
}

.success-message {
    max-width: 800px;
    margin: 4rem auto 0;
    padding: 2rem;
    background-color: rgba(34, 197, 94, 0.1); /* green-500 with opacity */
    border: 1px solid rgba(34, 197, 94, 0.5);
    border-radius: 12px;
    text-align: center;
    color: var(--text-primary);
}

.success-message i {
    color: #22c55e; /* green-500 */
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.success-message h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Адаптивность для формы */
@media (max-width: 768px) {
    .contact-form__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* 18. Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    z-index: 2000;
    transform: translateY(120%);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

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

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

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

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

.cookie-popup__text a:hover {
    text-decoration: none;
}

.cookie-popup__button {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    flex-shrink: 0; /* Чтобы кнопка не сжималась */
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
}
.cookie-popup__button:hover {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}


/* Адаптивность для Cookie Popup */
@media (max-width: 768px) {
    .cookie-popup {
        padding: 1.5rem 1rem;
    }
    .cookie-popup__content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .cookie-popup__button {
        width: 100%;
        padding: 0.8rem;
    }
}
/* 19. Стилі для сторінок політик (.pages) */

.pages {
    background-color: var(--bg-primary);
    padding: 5rem 0;
    color: var(--text-primary);
    line-height: 1.7;
}

/* Обмежуємо ширину контейнера на текстових сторінках для кращої читабельності */
.pages .container {
    max-width: 800px; 
}

.pages h1,
.pages h2 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.3;
}

.pages h1 {
    font-size: clamp(2rem, 5vw, 2.75rem); /* Адаптивний розмір */
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.pages h2 {
    font-size: clamp(1.5rem, 4vw, 1.75rem);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.pages p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.pages ul {
    list-style: none; /* Прибираємо стандартні маркери */
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.pages li {
    position: relative;
    padding-left: 1.75rem; /* Відступ для кастомного маркера */
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Створюємо кастомний маркер списку в стилі сайту */
.pages li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em; /* Вирівнювання по вертикалі */
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
    border-radius: 50%;
}

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

.pages a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 4px; /* Відступ підкреслення від тексту */
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.pages a:hover {
    background-color: rgba(47, 129, 247, 0.1);
    border-radius: 4px;
    text-decoration: none;
}