/* ====================
   GLOBAL STYLES
   ==================== */
:root {
    --bg-dark: #0D0D2B;
    --bg-light: #FFFFFF;
    --primary-accent: #3671E9;
    --primary-accent-hover: #2D5DC8;
    --text-light: #FFFFFF;
    --text-dark: #0D0D2B;
    --text-secondary: #A6B0C3;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

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

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

ul {
    list-style: none;
}

h1, h2, h3 {
    font-family: var(--font-primary);
    font-weight: 600;
}

.logo {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
}

.burger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.burger__line {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--text-dark);
    transition: all 0.3s ease-in-out;
}


/* ====================
   HEADER
   ==================== */
.header {
    padding: 1rem 0;
    background-color: var(--bg-light);
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

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

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

.nav__link {
    font-family: var(--font-secondary);
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: relative;
}

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

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

.nav__link--button {
    background-color: var(--primary-accent);
    color: var(--text-light);
    padding: 0.6rem 1.5rem;
    border-radius: 32px;
    transition: background-color 0.3s ease;
}

.nav__link--button:hover {
    background-color: var(--primary-accent-hover);
    color: var(--text-light);
}

.nav__link--button::after {
    display: none;
}

/* ====================
   FOOTER
   ==================== */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    padding: 4rem 0 0;
}

.footer__container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer__logo {
    color: var(--text-light);
    display: inline-block;
    margin-bottom: 1rem;
}

.footer__description {
    max-width: 300px;
}

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

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

.footer__link {
    color: var(--text-secondary);
}

.footer__link:hover {
    color: var(--text-light);
}

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

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

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}


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

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

    .burger {
        display: block;
    }

    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__column--about, .footer__list--contacts {
        align-items: center;
    }
    
    .footer__description {
        margin: 0 auto;
    }

    .footer__list--contacts li {
        justify-content: center;
        text-align: left;
    }
}

/* ====================
   BUTTONS
   ==================== */
.button {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.button--primary {
    background-color: var(--primary-accent);
    color: var(--text-light);
}

.button--primary:hover {
    background-color: var(--primary-accent-hover);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(54, 113, 233, 0.2);
}


/* ====================
   HERO SECTION
   ==================== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    overflow: hidden;
    background-color: #f8f9fa; /* Світлий фон як запасний варіант */
}

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

.hero__container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.hero__title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.hero__subtitle {
    font-size: 1.1rem;
    color: #495057; /* Трохи темніший сірий для кращого контрасту на світлому фоні */
    margin-bottom: 2.5rem;
    max-width: 500px;
}

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

.hero__img-placeholder {
    max-width: 100%;
    height: auto;
    display: none; /* Показуємо тільки якщо канвас не працює */
}

/* ====================
   HERO ADAPTIVE STYLES
   ==================== */
@media (max-width: 992px) {
    .hero__title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .hero {
        text-align: center;
    }
    .hero__container {
        grid-template-columns: 1fr;
    }
    .hero__visual {
        display: none; /* На мобільних пристроях фокус на тексті */
    }
    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero__title {
        font-size: 2.2rem;
    }
}

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

.section-header__title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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


/* ====================
   HOW IT WORKS SECTION
   ==================== */
.how-it-works {
    padding: 6rem 0;
    background-color: var(--bg-light);
}

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

.step-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(13, 13, 43, 0.07);
}

.step-card__icon-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #eaf1ff;
    margin-bottom: 1.5rem;
}

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

.step-card__title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.step-card__description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ====================
   HOW IT WORKS ADAPTIVE
   ==================== */
@media (max-width: 992px) {
    .how-it-works__steps-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section-header__title {
        font-size: 2rem;
    }
}

/* ====================
   TECH SECTION
   ==================== */
.tech {
    padding: 6rem 0;
    background-color: var(--bg-light);
}

.tech__tabs-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tech__tab-btn {
    padding: 0.8rem 2rem;
    font-family: var(--font-secondary);
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: #f1f3f5;
    border: none;
    border-radius: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tech__tab-btn:hover {
    background-color: #e9ecef;
}

.tech__tab-btn--active {
    background-color: var(--primary-accent);
    color: var(--text-light);
    box-shadow: 0 5px 15px rgba(54, 113, 233, 0.2);
}

.tech__tab-btn--active:hover {
    background-color: var(--primary-accent-hover);
}

.tech__tab-panel {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tech__tab-panel--active {
    display: block;
}

.tech__panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    background-color: #f8f9fa;
    padding: 3rem;
    border-radius: 16px;
}

.tech__panel-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.tech__panel-text p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.tech__panel-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====================
   TECH ADAPTIVE
   ==================== */
@media (max-width: 992px) {
    .tech__panel-grid {
        grid-template-columns: 1fr;
    }
    .tech__panel-text {
        order: 2; /* Text comes after image on mobile */
        text-align: center;
    }
     .tech__panel-image {
        order: 1;
    }
}

@media (max-width: 768px) {
    .tech__tab-btn {
        width: 100%;
    }
    .tech__panel-grid {
        padding: 2rem;
    }
}

/* ====================
   FAQ SECTION
   ==================== */
.faq {
    padding: 6rem 0;
    background-color: #f8f9fa;
}

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

.faq__item {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: margin 0.3s ease;
}

.faq__item[open] {
    margin-bottom: 1.5rem;
}

.faq__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    list-style: none; /* Remove default marker */
}

.faq__question::-webkit-details-marker {
    display: none; /* Hide for Safari */
}

.faq__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--primary-accent);
    transition: transform 0.3s ease;
}

.faq__item[open] .faq__icon {
    transform: rotate(180deg);
}

.faq__answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
    animation: fadeIn 0.4s ease;
}

/* ====================
   FAQ ADAPTIVE
   ==================== */
@media (max-width: 768px) {
    .faq__question {
        font-size: 1rem;
        padding: 1.25rem;
    }
}

/* ====================
   FEATURES SECTION
   ==================== */
.features {
    padding: 6rem 0;
    background-color: #f8f9fa; /* A slightly off-white for visual separation */
    overflow-x: hidden; /* Prevent horizontal scrollbar from AOS animations */
}

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

.features__image-wrapper {
    width: 100%;
}

.features__image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    object-fit: cover;
}

/* Modifier for left-aligned section header */
.section-header--left-aligned {
    text-align: left;
    margin: 0 0 2.5rem 0;
    max-width: none;
}

.features__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.feature-item:not(:last-child) {
    margin-bottom: 2rem;
}

.feature-item__icon {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: var(--primary-accent);
}

.feature-item__icon i {
    width: 24px;
    height: 24px;
    color: var(--text-light);
}

.feature-item__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature-item__description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ====================
   FEATURES ADAPTIVE
   ==================== */
@media (max-width: 992px) {
    .features__grid {
        grid-template-columns: 1fr;
    }
    .features__image-wrapper {
        margin-bottom: 3rem;
    }
    .section-header--left-aligned {
        text-align: center;
    }
    .feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

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

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

.contact__details {
    list-style: none;
    margin-top: 2rem;
}

.contact__details li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.contact__details i {
    color: var(--primary-accent);
}

.contact__form-wrapper {
    background-color: #fff;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(13, 13, 43, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group__label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

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

.form-group__input:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(54, 113, 233, 0.15);
}

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

.form-group--checkbox label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.form-group--checkbox a {
    text-decoration: underline;
}

.button--full-width {
    width: 100%;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.success-message {
    display: none; /* Hidden by default */
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

.success-message__icon {
    color: #28a745;
    margin-bottom: 1rem;
}
.success-message__icon i {
    width: 60px;
    height: 60px;
}

.success-message__title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.success-message__text {
    color: var(--text-secondary);
    font-size: 1.1rem;
}


/* ====================
   CONTACT ADAPTIVE
   ==================== */
@media (max-width: 992px) {
    .contact__grid {
        grid-template-columns: 1fr;
    }
    .contact__info {
        text-align: center;
    }
    .section-header--left-aligned {
        text-align: center;
        margin: 0 auto 2.5rem;
    }
    .contact__details {
        justify-content: center;
    }
}

/* ====================
   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: var(--bg-dark);
    color: var(--text-light);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 2000;
    transition: bottom 0.5s ease-in-out;
}

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

.cookie-popup__text {
    font-size: 0.9rem;
}

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

.cookie-popup__btn {
    background-color: var(--primary-accent);
    color: var(--text-light);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.cookie-popup__btn:hover {
    background-color: var(--primary-accent-hover);
}

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

/* ====================
   POLICY PAGES STYLES
   ==================== */
.pages {
    padding: 4rem 0;
}

.pages .container {
    max-width: 800px;
}

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

.pages h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.pages p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #495057;
}

.pages ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 1.5rem;
}

.pages li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #495057;
    margin-bottom: 0.75rem;
}

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

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