/* ==========================================================================
   1. Глобальні стилі та змінні
   ========================================================================== */
:root {
    --bg-dark: #10002b;
    --bg-medium: #240046;
    --bg-light: #3c096c;
    --primary: #5a189a;
    --accent: #ff6d00;
    --text-light: #e0aaff;
    --text-white: #ffffff;
    --font-headings: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

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

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

ul {
    list-style: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==========================================================================
   2. Хедер
   ========================================================================== */
.header {
    background-color: rgba(16, 0, 43, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid var(--bg-medium);
}

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

.header__logo {
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
}

.header__nav ul {
    display: flex;
    gap: 30px;
}

.header__nav a {
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

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

.header__nav a:hover::after {
    width: 100%;
}

.header__burger-btn {
    display: none;
    color: var(--text-white);
}

/* ==========================================================================
   3. Футер
   ========================================================================== */
.footer {
    background-color: var(--bg-medium);
    padding-top: 60px;
    margin-top: 80px; /* Відступ від останньої секції */
    border-top: 1px solid var(--bg-light);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 60px;
}

.footer__logo {
    font-family: var(--font-headings);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-white);
    display: inline-block;
    margin-bottom: 15px;
}

.footer__description {
    font-size: 14px;
    opacity: 0.8;
}

.footer__title {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer__list li {
    margin-bottom: 10px;
}

.footer__list a {
    font-size: 15px;
}

.footer__list--contacts li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer__list--contacts i {
    flex-shrink: 0;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.footer__bottom {
    background-color: var(--bg-dark);
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}


/* ==========================================================================
   4. Адаптивність
   ========================================================================== */
@media (max-width: 992px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header__nav {
        display: none; /* Логіку мобільного меню додамо пізніше */
    }
    .header__burger-btn {
        display: block;
    }
}

@media (max-width: 576px) {
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer__list--contacts li {
        justify-content: center;
        text-align: left;
    }
}

/* ==========================================================================
   5. Стилі для сторінок політик
   ========================================================================== */
.pages {
    padding: 80px 0;
}

.pages .container {
    max-width: 800px;
    background-color: var(--bg-medium);
    padding: 40px;
    border-radius: 8px;
}

.pages h1 {
    font-size: 36px;
    margin-bottom: 30px;
    color: var(--accent);
}

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

.pages p, .pages li {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

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

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

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

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

/* ==========================================================================
   6. Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 0;
    overflow: hidden;
    background-color: var(--bg-dark); /* Fallback for canvas */
}

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

.hero__container {
    position: relative;
    z-index: 2;
}

.hero__content {
    max-width: 800px;
    margin: 0 auto;
}

.hero__title {
    font-size: clamp(2.2rem, 5vw, 3.5rem); /* Адаптивний розмір шрифту */
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 650px;
    margin: 0 auto 40px;
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.hero__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--accent);
    color: var(--text-white);
    padding: 15px 30px;
    border-radius: 50px;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.hero__cta-btn:hover {
    transform: translateY(-3px);
    background-color: #ff8533; /* Світліший відтінок акцентного кольору */
    color: var(--text-white);
}

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

.hero__cta-btn:hover i {
    transform: translateX(5px);
}

/* ==========================================================================
   7. About Section
   ========================================================================== */
.about {
    padding: 80px 0;
    background-color: var(--bg-medium);
    overflow-x: hidden; /* Щоб анімація AOS не створювала горизонтальний скрол */
}

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

.about__heading {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.about__heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: var(--accent);
}

.about__description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.about__features-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about__features-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.about__features-list i {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: var(--accent);
    margin-top: 2px;
}

.about__features-list strong {
    color: var(--text-white);
}

.about__image-wrapper {
    padding: 15px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--bg-light));
    position: relative;
}

.about__image-wrapper img {
    border-radius: 12px;
}

/* Адаптивність для секції About */
@media (max-width: 992px) {
    .about__wrapper {
        grid-template-columns: 1fr;
    }
    .about__image-content {
        order: -1; /* Зображення буде зверху на мобільних */
        max-width: 500px;
        margin: 0 auto 40px;
    }
}

/* ==========================================================================
   8. Features Section
   ========================================================================== */
.features {
    padding: 80px 0;
    background-color: var(--bg-dark); /* Зберігаємо темний фон */
}

.features__main-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 60px;
    position: relative;
}

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

.features__card {
    background-color: rgba(36, 0, 70, 0.5); /* Напівпрозорий фон */
    border: 1px solid var(--bg-light);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(8px); /* Ефект розмиття */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.features__card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(90, 24, 154, 0.2), transparent 40%);
    transition: opacity 0.5s ease;
    opacity: 0;
    transform: rotate(0deg);
}

.features__card:hover::before {
    opacity: 1;
    animation: spin 5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.features__card-icon {
    margin: 0 auto 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--bg-light));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.features__card-icon i {
    width: 30px;
    height: 30px;
    color: var(--text-white);
}

.features__card-title {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-white);
}

.features__card-description {
    font-size: 15px;
    opacity: 0.9;
}

/* ==========================================================================
   9. Roadmap Section
   ========================================================================== */
.roadmap {
    padding: 80px 0;
    background-color: var(--bg-medium);
}

.roadmap__main-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 60px;
}

.roadmap__timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.roadmap__timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background-color: var(--primary);
    border-radius: 3px;
}

.roadmap__item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    margin-bottom: 40px;
}

/* Розташування блоків по сторонах */
.roadmap__item:nth-child(odd) {
    left: 0;
    padding-right: 60px;
    text-align: right;
}

.roadmap__item:nth-child(even) {
    left: 50%;
    padding-left: 60px;
    text-align: left;
}

.roadmap__icon-wrapper {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent);
    color: var(--text-white);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid var(--bg-medium);
    z-index: 10;
}

.roadmap__item:nth-child(odd) .roadmap__icon-wrapper {
    right: -25px;
}

.roadmap__item:nth-child(even) .roadmap__icon-wrapper {
    left: -25px;
}

.roadmap__icon-wrapper i {
    width: 24px;
    height: 24px;
}

.roadmap__content {
    background-color: var(--bg-dark);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--bg-light);
}

.roadmap__step-number {
    display: inline-block;
    background-color: var(--primary);
    color: var(--text-white);
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 10px;
}

.roadmap__item-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.roadmap__item-description {
    font-size: 15px;
    opacity: 0.8;
}

/* Адаптивність для Roadmap */
@media (max-width: 768px) {
    .roadmap__timeline::before {
        left: 25px;
    }

    .roadmap__item,
    .roadmap__item:nth-child(even) {
        width: 100%;
        left: 0;
        padding-left: 70px;
        padding-right: 20px;
        text-align: left;
    }

    .roadmap__item:nth-child(odd) {
        padding-right: 20px;
        text-align: left;
    }

    .roadmap__icon-wrapper,
    .roadmap__item:nth-child(odd) .roadmap__icon-wrapper,
    .roadmap__item:nth-child(even) .roadmap__icon-wrapper {
        left: 0;
        transform: translate(0, -50%);
    }
}

/* ==========================================================================
   10. FAQ Section
   ========================================================================== */
.faq {
    padding: 80px 0;
    background-color: var(--bg-dark);
}

.faq__main-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 60px;
}

.faq__accordion {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
}

.faq__item {
    border-bottom: 1px solid var(--bg-light);
}

.faq__item:last-child {
    border-bottom: none;
}

.faq__question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
    background-color: var(--bg-medium);
    transition: background-color 0.3s ease;
}

.faq__question:hover {
    background-color: var(--bg-light);
}

.faq__icon {
    flex-shrink: 0;
    margin-left: 15px;
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease-in-out;
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
    background-color: var(--bg-dark);
}

.faq__answer p {
    padding: 0 25px;
    font-size: 16px;
    line-height: 1.7;
    opacity: 0.9;
}

/* Styles for active state */
.faq__item.active .faq__question {
    background-color: var(--primary);
}

.faq__item.active .faq__icon {
    transform: rotate(180deg);
}

.faq__item.active .faq__answer {
    max-height: 200px; /* Встановіть достатню висоту */
    padding: 25px;
}

/* ==========================================================================
   11. Contact Section
   ========================================================================== */
.contact {
    padding: 80px 0;
    background-color: var(--bg-medium);
}

.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
    background-color: var(--bg-dark);
    padding: 50px;
    border-radius: 20px;
}

.contact__main-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 20px;
}

.contact__description {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact__info-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact__info-item i {
    width: 40px;
    height: 40px;
    padding: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    color: var(--text-white);
}

.contact__info-item h4 {
    margin-bottom: 3px;
    font-size: 14px;
    opacity: 0.8;
}

/* Form Styles */
.contact__form-group {
    position: relative;
    margin-bottom: 25px;
}

.contact__form-group input {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--bg-medium);
    border: 1px solid var(--bg-light);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 16px;
    transition: border-color 0.3s;
}

.contact__form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.contact__form-group label {
    position: absolute;
    top: 13px;
    left: 15px;
    font-size: 16px;
    color: var(--text-light);
    pointer-events: none;
    transition: all 0.3s ease;
}

.contact__form-group input:focus ~ label,
.contact__form-group input:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 12px;
    font-size: 12px;
    color: var(--accent);
    background-color: var(--bg-dark);
    padding: 0 5px;
}

.contact__captcha-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact__captcha-group input {
    width: 70px;
    padding: 8px;
    background-color: var(--bg-medium);
    border: 1px solid var(--bg-light);
    border-radius: 8px;
    color: var(--text-white);
}

.contact__checkbox-group {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact__checkbox-group label {
    font-size: 14px;
    opacity: 0.8;
}

.contact__checkbox-group a {
    color: var(--accent);
    text-decoration: underline;
}

.contact__submit-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--accent);
    color: var(--text-white);
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.contact__submit-btn:hover {
    background-color: #ff8533;
}

.contact__form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    display: none; /* Initially hidden */
}

.contact__form-message--success {
    background-color: rgba(26, 172, 110, 0.2);
    color: #34d399;
}

.contact__form-message--error {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Адаптивність */
@media (max-width: 992px) {
    .contact__wrapper {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   12. Cookie Pop-up
   ========================================================================== */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Initially hidden */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 600px;
    background-color: rgba(36, 0, 70, 0.8);
    backdrop-filter: blur(10px);
    color: var(--text-light);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    z-index: 200;
    transition: bottom 0.5s ease-in-out;
}

.cookie-popup.active {
    bottom: 20px;
}

.cookie-popup__text {
    font-size: 15px;
}

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

.cookie-popup__btn {
    flex-shrink: 0;
    padding: 10px 20px;
    background-color: var(--accent);
    color: var(--text-white);
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.cookie-popup__btn:hover {
    background-color: #ff8533;
}

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