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

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors */
    --background-color: #1A1A2E;
    --card-color: #16213E;
    --text-color: #F0F0F0;
    --text-color-light: #A9B4C7;
    --accent-color: #00C9A7;
    --secondary-color: #8E7CC3;
    --white-color: #FFFFFF;

    /* Typography */
    --body-font: 'Lato', sans-serif;
    --title-font: 'Poppins', sans-serif;

    /* Font sizes */
    --h1-font-size: 2.5rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
}

/* ==================== BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--background-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
    font-family: var(--title-font);
    font-weight: 700;
}

ul {
    list-style: none;
}

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

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

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

/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(142, 124, 195, 0.2);
}

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

.header__logo {
    font-family: var(--title-font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white-color);
    transition: color 0.3s;
}

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

.header__toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--white-color);
}

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

.header__link {
    font-family: var(--title-font);
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s;
    position: relative;
    padding-bottom: 0.25rem;
}

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

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

.header__link:hover::after {
    width: 100%;
}

/* ==================== FOOTER ==================== */
.footer {
    padding-top: 5rem;
    border-top: 1px solid rgba(142, 124, 195, 0.2);
}

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

.footer__logo {
    font-family: var(--title-font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white-color);
    display: inline-block;
    margin-bottom: 1rem;
}

.footer__description {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
}

.footer__title {
    font-size: var(--h3-font-size);
    margin-bottom: 1.5rem;
}

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

.footer__link {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
    transition: color 0.3s, padding-left 0.3s;
}

.footer__link:hover {
    color: var(--accent-color);
    padding-left: 0.25rem;
}

.footer__contact {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer__contact-icon {
    width: 16px;
    height: 16px;
    color: var(--secondary-color);
}

.footer__bottom {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(142, 124, 195, 0.1);
    text-align: center;
}

.footer__copy {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

/* ==================== MEDIA QUERIES ==================== */
@media screen and (max-width: 768px) {
    .header__nav {
        position: fixed;
        top: 4.5rem;
        right: -100%;
        width: 100%;
        height: 100%;
        background-color: var(--background-color);
        padding-top: 2rem;
        transition: right 0.4s ease;
    }
    
    .header__nav--active {
        right: 0;
    }

    .header__list {
        flex-direction: column;
        gap: 3rem;
    }
    
    .header__link {
        font-size: var(--h3-font-size);
    }

    .header__toggle {
        display: block;
    }
}

/* ==================== REUSABLE BUTTON ==================== */
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: var(--background-color);
    font-family: var(--title-font);
    font-weight: 500;
    border-radius: 0.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 201, 167, 0.3);
}

.button__icon {
    transition: transform 0.3s;
}

.button:hover .button__icon {
    transform: translateX(4px);
}

/* ==================== HERO ==================== */
.hero {
    padding-top: 8rem; /* Збільшено, щоб компенсувати фіксований хедер */
    padding-bottom: 6rem;
}

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

.hero__title {
    font-size: var(--h1-font-size);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.hero__title-typed {
    color: var(--accent-color);
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-color-light);
    margin-bottom: 2.5rem;
    max-width: 550px;
    line-height: 1.6;
}

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

.hero__image {
    border-radius: 1rem;
    max-width: 450px;
    width: 100%;
}

/* Typed.js cursor style */
.typed-cursor {
    color: var(--accent-color);
    font-size: var(--h1-font-size);
}

/* ==================== MEDIA QUERIES (Hero) ==================== */
@media screen and (min-width: 768px) {
    .hero__container {
        grid-template-columns: 1.1fr 0.9fr;
    }

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

@media screen and (min-width: 1024px) {
    .hero__title {
        font-size: 3.5rem;
    }
}

/* ==================== REUSABLE SECTION STYLES ==================== */
.section {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.section__title {
    font-size: var(--h2-font-size);
    margin-bottom: 1rem;
}

.section__subtitle {
    font-size: var(--normal-font-size);
    color: var(--text-color-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==================== ANALYTICS SECTION ==================== */
.analytics__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.analytics__card {
    background-color: var(--card-color);
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(142, 124, 195, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.analytics__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.analytics__card-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.analytics__card-icon i {
    width: 40px;
    height: 40px;
}

.analytics__card-title {
    font-size: var(--h3-font-size);
    margin-bottom: 1rem;
}

.analytics__card-text {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    line-height: 1.7;
}

/* ==================== MEDIA QUERIES (Section) ==================== */
@media screen and (min-width: 768px) {
    .section__title {
        font-size: 2rem;
    }
    
    .analytics__grid {
        gap: 2rem;
    }
}

/* ==================== STRATEGIES (ACCORDION) ==================== */
.strategies__container {
    max-width: 750px;
    margin: 0 auto;
}

.accordion__item {
    border-bottom: 1px solid rgba(142, 124, 195, 0.2);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.accordion__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 1rem 0;
    transition: color 0.3s;
}

.accordion__title {
    font-size: 1.1rem;
    font-weight: 500;
    transition: color .3s;
}

.accordion__icon {
    color: var(--secondary-color);
    transition: transform .3s;
}

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

.accordion__text {
    padding: 0 1rem 0 0;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    line-height: 1.7;
}

/* Active state for accordion */
.accordion__item.accordion--active .accordion__header .accordion__title {
    color: var(--accent-color);
}

.accordion__item.accordion--active .accordion__icon {
    transform: rotate(45deg);
    color: var(--accent-color);
}

.accordion__item.accordion--active .accordion__content {
    /* Значення max-height має бути достатнім для вмісту */
    max-height: 200px; 
    padding-top: 1rem;
}

@media screen and (min-width: 768px) {
    .accordion__title {
        font-size: var(--h3-font-size);
    }
}

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

.case-card {
    background-color: var(--card-color);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(142, 124, 195, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.case-card__image-wrapper {
    overflow: hidden;
    height: 250px;
}

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

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

.case-card__content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.case-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.case-card__tag {
    background-color: rgba(142, 124, 195, 0.2);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
}

.case-card__title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.75rem;
}

.case-card__description {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.case-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    font-family: var(--title-font);
    font-weight: 500;
    transition: gap 0.3s;
}

.case-card__link:hover {
    gap: 0.75rem;
}

/* ==================== MEDIA QUERIES (Cases) ==================== */
@media screen and (min-width: 992px) {
    .cases__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==================== PROCESS (TIMELINE) ==================== */
.process__timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 3rem; /* Space for the timeline line and icons */
}

/* The vertical line */
.process__timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background-color: rgba(142, 124, 195, 0.2);
}

.timeline__item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline__item:last-child {
    margin-bottom: 0;
}

.timeline__icon {
    position: absolute;
    left: 20px;
    top: 0;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: var(--background-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.timeline__icon i {
    width: 20px;
    height: 20px;
}

.timeline__content {
    background-color: var(--card-color);
    border: 1px solid rgba(142, 124, 195, 0.2);
    border-radius: 0.5rem;
    padding: 1.5rem 2rem;
}

.timeline__title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.75rem;
}

.timeline__description {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    line-height: 1.7;
}


@media screen and (max-width: 576px) {
    .process__timeline {
        padding-left: 2.5rem;
    }

    .timeline__icon {
        left: 15px;
        width: 30px;
        height: 30px;
    }
    
    .timeline__icon i {
        width: 16px;
        height: 16px;
    }

    .timeline__content {
       padding: 1rem 1.5rem;
    }
}

/* ==================== CONTACT ==================== */
.contact__container {
    max-width: 600px;
    margin: 0 auto;
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    margin-bottom: 0.5rem;
}

.form__input {
    width: 100%;
    padding: 1rem;
    background-color: var(--card-color);
    border: 1px solid rgba(142, 124, 195, 0.2);
    border-radius: 0.5rem;
    color: var(--text-color);
    font-size: var(--normal-font-size);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form__input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 201, 167, 0.2);
}

.form__captcha-question {
    font-weight: 700;
    color: var(--text-color);
}

.form__group--checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form__checkbox {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--accent-color);
}

.form__label-checkbox {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.form__label-checkbox a {
    color: var(--accent-color);
    text-decoration: underline;
}

.contact__button {
    width: 100%;
    justify-content: center;
    padding: 1.25rem;
    font-size: 1.1rem;
}

.form__message {
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    font-size: var(--normal-font-size);
    margin-top: 2rem;
    display: none; /* Hidden by default */
}

.form__message--success {
    display: block;
    background-color: rgba(0, 201, 167, 0.1);
    border: 1px solid var(--accent-color);
    color: var(--text-color);
}

.form__message--error {
    display: block;
    background-color: rgba(255, 82, 82, 0.1);
    border: 1px solid #FF5252;
    color: var(--text-color);
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--card-color);
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(142, 124, 195, 0.2);
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

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

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

.cookie-popup__text {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
}

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

.cookie-popup__button {
    padding: 0.75rem 1.5rem;
    flex-shrink: 0; /* Щоб кнопка не стискалася */
}

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

/* ==================== STATIC PAGES (PRIVACY, TERMS, ETC.) ==================== */
.pages {
    padding-top: 8rem;
    padding-bottom: 8rem;
}

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

.pages h1 {
    font-size: var(--h1-font-size);
    margin-bottom: 2rem;
    color: var(--white-color);
}

.pages h2 {
    font-size: var(--h2-font-size);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--white-color);
}

.pages p, 
.pages li {
    font-size: var(--normal-font-size);
    line-height: 1.8;
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.pages ul,
.pages ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.pages ul li {
    list-style-type: disc;
}

.pages ol li {
    list-style-type: decimal;
}

.pages a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-color);
    transition: background-color 0.3s;
}

.pages a:hover {
    background-color: rgba(0, 201, 167, 0.1);
}

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