/* --- Variables & Global Settings --- */
:root {
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;

    --color-bg: #0a192f;
    --color-bg-light: #112240;
    --color-text: #8892b0;
    --color-heading: #ccd6f6;
    --color-accent: #64ffda; /* Neon Cyan */
    --color-white: #e6f1ff;
    
    --transition: all 0.3s ease;
    --shadow-header: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-header);
    display: flex;
    align-items: center;
}

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

.header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-accent);
}

.header__logo-icon {
    animation: pulse-glow 3s infinite ease-in-out;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(100, 255, 218, 0.3)); }
    50% { filter: drop-shadow(0 0 8px rgba(100, 255, 218, 0.6)); }
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.header__list {
    display: flex;
    gap: 30px;
}

.header__link {
    font-size: 0.9rem;
    color: var(--color-heading);
    position: relative;
}

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

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

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

.header__cta {
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    background: transparent;
}

.header__cta:hover {
    background: rgba(100, 255, 218, 0.1);
}

/* Mobile Menu Burger */
.header__burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.header__burger-line {
    width: 30px;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition);
}

/* --- Footer --- */
.footer {
    background-color: var(--color-bg-light);
    padding: 60px 0 20px;
    margin-top: auto; /* Keeps footer at bottom if content is short */
    border-top: 1px solid rgba(100, 255, 218, 0.1);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-heading);
    margin-bottom: 20px;
}

.footer__desc {
    font-size: 0.9rem;
    max-width: 300px;
    margin-bottom: 20px;
}

.footer__title {
    font-family: var(--font-heading);
    color: var(--color-heading);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__link {
    font-size: 0.9rem;
}

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

.footer__contact-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
}

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

.footer__bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(136, 146, 176, 0.1);
    font-size: 0.8rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    /* Header Mobile */
    .header__burger {
        display: flex;
    }

    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background-color: var(--color-bg-light);
        flex-direction: column;
        justify-content: center;
        padding: 20px;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .header__nav.is-active {
        right: 0;
    }

    .header__list {
        flex-direction: column;
        align-items: center;
        margin-bottom: 30px;
    }

    .header__cta {
        width: 100%;
        text-align: center;
    }

    /* Burger Animation */
    .header__burger.is-active .header__burger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    .header__burger.is-active .header__burger-line:nth-child(2) {
        opacity: 0;
    }
    .header__burger.is-active .header__burger-line:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    /* Footer Mobile */
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* --- UI Components (Buttons) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn--primary {
    background-color: var(--color-accent);
    color: var(--color-bg);
    border: 1px solid var(--color-accent);
}

.btn--primary:hover {
    background-color: rgba(100, 255, 218, 0.8);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.4);
}

.btn--outline {
    background-color: transparent;
    border: 1px solid var(--color-heading);
    color: var(--color-heading);
    margin-left: 15px;
}

.btn--outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.text-accent {
    color: var(--color-accent);
}

/* --- Hero Section --- */
.hero {
    padding: 140px 0 80px; /* Відступ зверху враховує фіксований хедер */
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Background Glow Effect */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(100,255,218,0.15) 0%, rgba(10,25,47,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero__container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(100, 255, 218, 0.1);
    color: var(--color-accent);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 24px;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

.hero__title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    line-height: 1.1;
    color: var(--color-heading);
    margin-bottom: 24px;
}

.hero__desc {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 40px;
    max-width: 540px;
}

.hero__actions {
    margin-bottom: 60px;
}

.hero__stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid rgba(136, 146, 176, 0.2);
    padding-top: 30px;
}

.hero__stat-item {
    display: flex;
    flex-direction: column;
}

.hero__stat-num {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-white);
    font-weight: 700;
}

.hero__stat-label {
    font-size: 0.85rem;
    color: var(--color-text);
}

/* --- Hero Visual (Animation Grid) --- */
.hero__visual {
    position: relative;
    height: 400px;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 8px;
    perspective: 1000px;
}

.visual-dot {
    width: 100%;
    height: 100%;
    background-color: rgba(136, 146, 176, 0.1);
    border-radius: 2px;
    transition: background-color 0.3s;
}

.visual-dot.active {
    background-color: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero__title {
        font-size: 2rem;
    }

    .hero__desc {
        margin: 0 auto 40px;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__stats {
        justify-content: center;
    }

    .hero__visual {
        display: none; /* Приховуємо складну анімацію на планшетах для продуктивності */
    }
}

@media (max-width: 576px) {
    .hero__title {
        font-size: 2rem;
    }
    
    .hero__actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn--outline {
        margin-left: 0;
    }
}

/* --- General Section Styles --- */
.section {
    padding: 100px 0;
}

.section__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section__title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-heading);
    margin-bottom: 20px;
}

.section__subtitle {
    color: var(--color-text);
    font-size: 1.1rem;
}

/* --- Solutions Grid --- */
.solutions__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* --- Feature Card --- */
.solution-card {
    background-color: var(--color-bg-light);
    padding: 40px 30px;
    border-radius: 8px;
    border: 1px solid rgba(136, 146, 176, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Hover Effect: Lift & Glow */
.solution-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

/* Icon Styling */
.solution-card__icon-box {
    width: 60px;
    height: 60px;
    background-color: rgba(100, 255, 218, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: var(--color-accent);
    transition: var(--transition);
}

.solution-card__icon-box i {
    width: 32px;
    height: 32px;
}

.solution-card:hover .solution-card__icon-box {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

.solution-card__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-heading);
    margin-bottom: 15px;
}

.solution-card__desc {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.6;
}

.solutions__footer {
    text-align: center;
}

/* --- Scroll Animation Base Classes --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section__title {
        font-size: 2rem;
    }
    
    .solutions__grid {
        grid-template-columns: 1fr;
    }
}

/* --- Process / Timeline Section --- */
.process {
    position: relative;
}

.process__steps {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Vertical Line */
.process__steps::before {
    content: '';
    position: absolute;
    top: 0;
    left: 29px; /* Центрування по ширині номера */
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--color-accent) 0%, rgba(100, 255, 218, 0.1) 100%);
    z-index: 0;
}

.process__step {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    position: relative;
    z-index: 1;
    background-color: var(--color-bg); /* Щоб перекрити лінію під номером, якщо треба, але тут ми робимо номер круглим */
    padding: 20px;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.process__step:hover {
    background-color: var(--color-bg-light);
    border-color: rgba(100, 255, 218, 0.2);
}

.process__number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background-color: var(--color-bg-light);
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-accent);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.2);
}

.process__content {
    padding-top: 5px;
}

.process__title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-white);
    margin-bottom: 10px;
}

.process__desc {
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.7;
}

.process__desc strong {
    color: var(--color-heading);
    font-weight: 600;
}

.text-link {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

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

/* --- Responsive --- */
@media (max-width: 576px) {
    .process__steps::before {
        left: 20px;
    }

    .process__number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .process__step {
        padding: 15px;
        gap: 20px;
    }

    .process__title {
        font-size: 1.2rem;
    }
}

/* --- Blog Section --- */
.blog__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background-color: var(--color-bg-light);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(136, 146, 176, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: rgba(100, 255, 218, 0.3);
}

/* Image Area */
.blog-card__image {
    height: 200px;
    background-color: #1d2d50; /* Placeholder color if image missing */
    position: relative;
    overflow: hidden;
}

.blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0.8;
}

.blog-card:hover .blog-card__img {
    transform: scale(1.05);
    opacity: 1;
}

.blog-card__tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--color-accent);
    color: var(--color-bg);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Content Area */
.blog-card__content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--color-text);
    margin-bottom: 15px;
    opacity: 0.7;
}

.icon-sm {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

.blog-card__title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-heading);
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-card__excerpt {
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-card__link {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-accent);
    transition: var(--transition);
}

.blog-card__link:hover {
    gap: 5px; /* Move arrow slightly */
}

/* Highlight Card (Quiz/Test) */
.blog-card--highlight {
    background: linear-gradient(145deg, var(--color-bg-light) 0%, rgba(100, 255, 218, 0.05) 100%);
    border: 1px solid rgba(100, 255, 218, 0.2);
}

.blog-card__icon-big {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.blog-card__icon-big i {
    width: 48px;
    height: 48px;
}

.h-full { height: 100%; }
.flex-column { flex-direction: column; }
.mt-auto { margin-top: auto; }
.full-width { width: 100%; text-align: center; }

/* Responsive */
@media (max-width: 768px) {
    .blog__grid {
        grid-template-columns: 1fr;
    }
    
    .blog-card__image {
        height: 220px;
    }
}

/* --- Contact Section --- */
.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact__info-list {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact__info-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-heading);
    font-weight: 500;
}

.contact__form-box {
    background-color: var(--color-bg-light);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
    position: relative;
}

/* Form Elements */
.form__group {
    margin-bottom: 20px;
}

.form__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--color-heading);
}

.form__input {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(10, 25, 47, 0.5); /* Darker input bg */
    border: 1px solid rgba(136, 146, 176, 0.2);
    border-radius: 4px;
    color: var(--color-heading);
    font-family: var(--font-main);
    transition: var(--transition);
}

.form__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.1);
}

/* Checkbox */
.form__checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 25px;
}

.form__checkbox {
    margin-top: 4px;
    accent-color: var(--color-accent);
}

.form__checkbox-label {
    font-size: 0.8rem;
    color: var(--color-text);
    line-height: 1.4;
}

/* Success Message */
.contact__success {
    text-align: center;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(100, 255, 218, 0.1);
    color: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

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

/* Button Loader */
.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(10, 25, 47, 0.3);
    border-top: 2px solid var(--color-bg);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* --- Cookie Popup --- */
.cookie-popup {
    position: fixed;
    bottom: -500px; /* Hidden initially */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background-color: rgba(17, 34, 64, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--color-accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 9999;
    transition: bottom 0.5s ease;
}

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

.cookie-content p {
    font-size: 0.9rem;
    color: var(--color-heading);
    margin: 0;
}

.btn--sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* --- Policy Pages Styles (Етап 5.2) --- */
/* Ці стилі працюватимуть для privacy.html тощо */
.pages {
    padding: 140px 0 60px; /* Більший відступ зверху через фіксований хедер */
}

.pages h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 30px;
}

.pages h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-heading);
    margin-top: 40px;
    margin-bottom: 20px;
}

.pages p {
    margin-bottom: 15px;
    color: var(--color-text);
}

.pages ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
    color: var(--color-text);
}

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

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

/* Responsive Contact */
@media (max-width: 768px) {
    .contact__wrapper {
        grid-template-columns: 1fr;
    }
    
    .cookie-popup {
        flex-direction: column;
        text-align: center;
    }
}