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

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors */
    --color-primary: #4A6CFD;
    --color-primary-hover: #3556E5;
    --color-dark: #12141D;
    --color-light: #FFFFFF;
    --color-gray: #F3F4F6;
    --color-text: #1E293B;
    --color-text-light: #64748B;
    --color-footer-text: #D1D5DB;

    /* Fonts */
    --font-family-headings: 'Manrope', sans-serif;
    --font-family-body: 'Inter', sans-serif;

    /* Other */
    --container-width: 1140px;
    --border-radius: 8px;
    --transition-duration: 0.3s;
}

/* ==================== GLOBAL STYLES ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

ul {
    list-style: none;
}

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

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

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

/* ==================== REUSABLE CLASSES ==================== */
.container {
    max-width: calc(var(--container-width) + 2rem);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ==================== HEADER ==================== */
.header {
    background-color: var(--color-light);
    border-bottom: 1px solid var(--color-gray);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.8);
}

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

.header__logo {
    font-family: var(--font-family-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
}

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

.nav__link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding: 0.25rem 0;
}

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

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

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

.header__burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-dark);
}

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

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

.footer__column--main {
    grid-column: span 1;
}

.footer__logo {
    font-family: var(--font-family-headings);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-light);
    display: inline-block;
    margin-bottom: 1rem;
}

.footer__description {
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 300px;
}

.footer__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-light);
    margin-bottom: 1.25rem;
}

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

.footer__link {
    color: var(--color-footer-text);
    transition: color var(--transition-duration);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.footer__icon {
    width: 18px;
    height: 18px;
}

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

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

@media (max-width: 768px) {
    .header__nav {
        display: none; /* Will implement mobile menu logic later */
    }
    .header__burger-btn {
        display: block;
    }

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

    .footer__column--main,
    .footer__list--contacts {
        align-items: center;
    }
    
    .footer__link {
        justify-content: center;
    }
}

/* ==================== HERO ==================== */
.hero {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

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

.hero__content {
    z-index: 2;
    text-align: center;
}

.hero__title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero__description {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
}

.hero__cta {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-light);
    padding: 1rem 2.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    transition: background-color var(--transition-duration), transform var(--transition-duration);
}

.hero__cta:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-3px);
}

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

#particle-canvas {
    width: 100%;
    height: 100%;
}

/* --- RESPONSIVENESS --- */
@media (min-width: 768px) {
    .hero {
        padding: 8rem 0;
    }
    
    .hero__container {
        grid-template-columns: repeat(2, 1fr);
        gap: 4rem;
    }

    .hero__content {
        text-align: left;
    }

    .hero__title,
    .hero__description {
        margin-left: 0;
        margin-right: 0;
    }

    .hero__visual {
        position: relative;
        height: 400px;
    }

    #particle-canvas {
        position: absolute;
    }
}

@media (max-width: 767px) {
    .hero__title {
        font-size: 2.5rem;
    }
}

/* ==================== REUSABLE CLASSES (add this part to the section) ==================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.section-header__title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header__subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
}


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

.how-it-works__steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.step-card {
    background-color: var(--color-light);
    border: 1px solid #E5E7EB;
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform var(--transition-duration), box-shadow var(--transition-duration);
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.07);
}

.step-card__icon-wrapper {
    margin: 0 auto 1.5rem;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #E9EFFF; /* Light blue background for icon */
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.step-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.step-card__description {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* --- RESPONSIVENESS --- */
@media (min-width: 768px) {
    .how-it-works__steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

/* ==================== TECHNOLOGIES ==================== */
.technologies {
    padding: 6rem 0;
    background-color: var(--color-light);
}

.technologies__wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.tabs__nav {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
    background-color: var(--color-gray);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    flex-wrap: wrap;
}

.tabs__button {
    flex: 1;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-light);
    background-color: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-duration);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.tabs__button-icon {
    width: 18px;
    height: 18px;
}

.tabs__button:hover {
    color: var(--color-dark);
}

.tabs__button--active {
    background-color: var(--color-light);
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.05);
}

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

.tabs__panel--active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.panel__title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.panel__description {
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

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

.panel__list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel__list li i {
    color: var(--color-primary);
    width: 20px;
    height: 20px;
}

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

.panel__image {
    border-radius: var(--border-radius);
    max-width: 100%;
    height: auto;
}

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

/* --- RESPONSIVENESS --- */
@media (min-width: 768px) {
    .tabs__panel--active {
        grid-template-columns: 1.2fr 1fr; /* Text column wider */
        gap: 4rem;
    }
}

@media (max-width: 600px) {
    .tabs__nav {
        flex-direction: column;
    }
}

/* ==================== EXAMPLES (SLIDER) ==================== */
.examples {
    background-color: var(--color-gray);
    padding: 6rem 0;
}

.examples-slider {
    width: 100%;
    padding-top: 1rem; /* Space for pagination */
    padding-bottom: 3rem; /* Space for pagination */
}

.swiper-slide {
    width: auto; /* Important for slidesPerView: 'auto' */
}

.example-card {
    width: 350px;
    background-color: var(--color-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-duration), box-shadow var(--transition-duration);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.example-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.example-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.example-card__content {
    padding: 1.5rem;
    flex-grow: 1;
}

.example-card__category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #E9EFFF;
    color: var(--color-primary);
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.example-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.example-card__description {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

/* Swiper Pagination styles */
.swiper-pagination-bullet {
    background-color: #CBD5E1;
    opacity: 1;
    transition: background-color var(--transition-duration);
}

.swiper-pagination-bullet-active {
    background-color: var(--color-primary);
}

/* ==================== FUTURE ==================== */
.future {
    padding: 6rem 0;
    background-color: var(--color-light);
}

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

.future__title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.future__description {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.future__cta {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-light);
    padding: 1rem 2.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    transition: background-color var(--transition-duration), transform var(--transition-duration);
}

.future__cta:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-3px);
}

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

.future__icon {
    width: 200px;
    height: 200px;
    color: var(--color-gray);
}


/* --- RESPONSIVENESS --- */
@media (min-width: 992px) {
    .future__container {
        grid-template-columns: 1.2fr 1fr;
        gap: 5rem;
    }
    .future__icon {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 767px) {
    .future {
        text-align: center;
    }
    
    .future__description {
        margin-left: auto;
        margin-right: auto;
    }

    .future__visual {
        order: -1; /* Move icon to the top on mobile */
        margin-bottom: 2rem;
    }
    
    .future__icon {
        width: 150px;
        height: 150px;
    }
}

/* ==================== CONTACT ==================== */
.contact {
    padding: 6rem 0;
    background-color: var(--color-gray);
}

.contact-form__wrapper {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--color-light);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

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

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

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 1rem;
    font-family: var(--font-family-body);
    transition: border-color var(--transition-duration), box-shadow var(--transition-duration);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 108, 253, 0.2);
}

.form-group--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}

.form-checkbox {
    margin-top: 0.25rem;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
}

.form-checkbox__label {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.form-checkbox__label a {
    color: var(--color-primary);
    text-decoration: underline;
}

.form-button {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-primary);
    color: var(--color-light);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-duration);
}

.form-button:hover {
    background-color: var(--color-primary-hover);
}

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

.form-success__icon-wrapper {
    width: 72px;
    height: 72px;
    background-color: #D1FAE5; /* Green 100 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.form-success__icon {
    color: #059669; /* Green 600 */
    width: 40px;
    height: 40px;
}

.form-success__title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.form-success__message {
    color: var(--color-text-light);
}

/* Validation error state */
.form-input.invalid {
    border-color: #EF4444; /* Red 500 */
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    max-width: 500px;
    background-color: var(--color-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: translateY(200%);
    transition: transform 0.5s ease-in-out;
}

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

.cookie-popup__text {
    color: var(--color-text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

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

.cookie-popup__accept {
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary);
    color: var(--color-light);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color var(--transition-duration);
}

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

@media (min-width: 576px) {
    .cookie-popup {
        flex-direction: row;
        align-items: center;
        max-width: none;
        left: 50%;
        transform: translate(-50%, 200%);
        width: calc(100% - 3rem);
        max-width: 1140px;
    }
    .cookie-popup.active {
       transform: translate(-50%, 0);
    }
    .cookie-popup__accept {
        flex-shrink: 0;
    }
}


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

.pages .container {
    max-width: 800px; /* Narrower container for readability */
}

.pages h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-gray);
    padding-bottom: 1rem;
}

.pages h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.pages p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--color-text);
}

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

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

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

.pages li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

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